<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 16, 2016 at 4:37 PM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@caesar.elte.hu" target="_blank">leves@caesar.elte.hu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On Sat, 16 Jan 2016, Mariano Martinez Peck wrote:<br>
<br></span>
(Still no quote.)<br>
<br>
How will you read the output of the process without having your image&#39;s process blocked in the FFI callout?<br>
How will you make sure that writes to input of the process won&#39;t block the FFI callout?</blockquote><div><br></div><div>This presupposes the threaded FFI.  The threaded FFI allows the VM to make any number of blocking calls, adding a new thread to run the VM whenever the VM is stalled when the heartbeat beats.  hence one can freely read and write to/from i/o blocking i/o streams (including pipes and sockets) or blocking database connexions, etc, all without stating that the FFI call must be done in a special way, since all calls through the FFI can block without blocking the VM.</div><div><br></div><div>Note that the scheme is also amenable to plugins, but the plugins must be rewritten to include the release vm/acquire vm calls around a blocking call.  With the threaded VM the FFI includes these calls around every FFI call.</div><div><br></div><div>HTH</div></div><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>