<div dir="ltr">I have not found the post you mention. Based on <a href="https://mercure.iro.umontreal.ca/pipermail/gambit-list/2014-February/007441.html">https://mercure.iro.umontreal.ca/pipermail/gambit-list/2014-February/007441.html</a>, I understood it was a work in progress... If you remember the thread, it would be great.<div>

<br></div><div>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)?</div><div><br></div><div>

Thank you!</div><div><br></div><div>Regards,</div><div>Francisco</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 31, 2014 at 3:18 AM, Mikael <span dir="ltr"><<a href="mailto:mikael.rcv@gmail.com" target="_blank">mikael.rcv@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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 attachment.<div>

<br></div><div>When you get this going please share your experience.</div>

<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-30 23:02 GMT+02:00 Francisco <span dir="ltr"><<a href="mailto:fjvallarino@gmail.com" target="_blank">fjvallarino@gmail.com</a>></span>:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>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.</div>





<div><br></div><div>I understand that this is not possible using a single VM (based on [1]), but I have recently seen some discussion regarding multiple VMs on a single process [2]. 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.</div>





<div><br></div><div>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.</div>





<div><br></div><div>Thank you!</div><div><br></div><div>Regards,</div><div>Francisco</div><div><br></div><div>[1]: <a href="https://mercure.iro.umontreal.ca/pipermail/gambit-list/2006-June/000741.html" target="_blank">https://mercure.iro.umontreal.ca/pipermail/gambit-list/2006-June/000741.html</a> </div>





<div>[2]: <a href="https://mercure.iro.umontreal.ca/pipermail/gambit-list/2014-February/007441.html" target="_blank">https://mercure.iro.umontreal.ca/pipermail/gambit-list/2014-February/007441.html</a></div><div><br></div>



</div>
<br></div></div>_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>