chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] weird FFI callbacks


From: Thomas Chust
Subject: Re: [Chicken-users] weird FFI callbacks
Date: Thu, 31 Mar 2011 14:40:23 +0200

2011/3/31 Moritz Heidkamp <address@hidden>:
> Hi,
>
> Thomas Chust <address@hidden> writes:
>> Your only option in the out of luck situation is not to use regular
>> callbacks at all but to implement a sort of in-process remote
>> procedure call system where a C stub registered as a callback
>> transfers call information to a Scheme thread, waits for a reply from
>> there and then returns. Needless to say, this can be relatively tricky
>> to implement.
>
> this could be easily implemented using ZeroMQ's inproc transport.
> [...]

Hello Moritz,

the transport is not the tricky part. Problematic points are, for
example:

 * How to convert arguments and return values between their binary
   representation in C and something that the Scheme RPC server can
   understand without calling any CHICKEN API functions because those
   are off-limits for the callback stub?
 * How to manage memory for marshalled data?
 * How to integrate the whole RPC transport with CHICKEN's cooperative
   multithreading system?

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]