[gambit-list] Asynchronous callbacks
fjvallarino at gmail.com
Tue Apr 1 10:06:06 EDT 2014
I have not found the post you mention. Based on
I understood it was a work in progress... If you remember the thread, it
would be great.
Has anyone faced a similar situation regarding asynchronous callbacks? Do
you have any suggestion about handling that situation (maybe a different
approach than the one I proposed)?
On Mon, Mar 31, 2014 at 3:18 AM, Mikael <mikael.rcv at gmail.com> wrote:
> It is possible to have more than one GVM in one OS process, please see
> Marc's posting from the spring of 2012 I believe it was, with code
> When you get this going please share your experience.
> 2014-03-30 23:02 GMT+02:00 Francisco <fjvallarino at gmail.com>:
>> I'm doing some tests using SDL2 (via Scheme Spheres bindings), and I'm
>> having an issue related to multithreading. I want to generate audio
>> procedurally, so what I need basically is access to an audio buffer that I
>> can write on. SDL2 provides access to this buffer using a callback
>> mechanism, which periodically invokes a provided function that is
>> responsible for filling the buffer. This function is invoked in a separate
>> thread of the main event loop. I implemented this callback function using
>> c-define, but it eventually leads to a segmentation fault.
>> I understand that this is not possible using a single VM (based on ),
>> but I have recently seen some discussion regarding multiple VMs on a single
>> process . Is this functionality available for testing? I know that for
>> the moment it is considered alpha, but it could help for doing some
>> preliminary tests. I intend to have the main program running on a Gambit
>> VM, and for audio processing implement a C callback which will in turn
>> invoke a function on a different Gambit VM (both created when the program
>> starts, probably on a simple C initialization program). These VMs would
>> communicate via message passing/sockets/etc.
>> For the moment I have the audio processing logic implemented in pure C,
>> but I'd rather use Scheme for (almost) everything. This issue also arises
>> in other asynchronous calls, for instance suspend/resume events on mobile
>> platforms (Android specifically). I know that using multiple processes is
>> an option on desktop versions, but I don't think I can create separate
>> processes on Android.
>> Thank you!
>> Gambit-list mailing list
>> Gambit-list at iro.umontreal.ca
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gambit-list