[squeak-dev] Re: [Pharo-project] [Vm-dev] Re: Can OSProcess
functionality be implemented using FFI instead of plugin?
eliot.miranda at gmail.com
Sun Jan 17 02:10:21 UTC 2016
On Sat, Jan 16, 2016 at 4:37 PM, Levente Uzonyi <leves at caesar.elte.hu>
> On Sat, 16 Jan 2016, Mariano Martinez Peck wrote:
> (Still no quote.)
> How will you read the output of the process without having your image's
> process blocked in the FFI callout?
> How will you make sure that writes to input of the process won't block the
> FFI callout?
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.
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev