[Vm-dev] bulid.squeak.org puzzlement

Eliot Miranda eliot.miranda at gmail.com
Thu Dec 10 19:10:46 UTC 2015

On Thu, Dec 10, 2015 at 10:03 AM, David T. Lewis <lewis at mail.msen.com>

> Actually, OSProcess does not need to poll. That's the purpose of
> AioPlugin, which notifies on data available on a descriptor (similar to
> what we do with socket reads).

that's what I meant.  To read the output of a command without blocking the
VM one needs to use AioPlugin, and that's a source of non-determinism.
Whereas if the FFI were non-blocking one could have a much more
predictable, reliable and simple solution.  There are other cases too, such
as DNS lookups where there are threads spawned in the VM to do the lookup
without blocking the VM, which duplicates a lot of machinery.  IMO it's far
better to have one single mechanism rather than several different
implementations of something similar.

> But deterministic or not, it isn't entirely reliable in any case.

It would be great to understand this better.  But in any case I think we
need this to be absolutely bullet-proof and when time is available to
finish the threaded FFI IMO OSProcess should be one of the things we
reimplement to use the new facilities to make it as simple as possible.

> Dave
> >
> > Hi Tim,
> >
> >     but OSProcess is /not/ deterministic, because of the lack of
> > non-blocking i/o calls.  To read from the pipes that provide the
> > output of commands, OSProcess has to use loops that poll for output
> > after a delay.  This is an awful hack and a source of non-determinism.
> >  It's increasingly urgent that we have a threaded FFI and discard
> > hacks like this, especially in key infrastructure like spawning
> > external commands.  Fortunately thus work will likely get funded next
> > year and my prototype should be productized some time in 2016.
> >
> > _,,,^..^,,,_ (phone)
> >
> >> On Dec 9, 2015, at 8:37 PM, tim Rowledge <tim at rowledge.org> wrote:
> >>
> >>
> >> Thanks for that summary Dave.  Ain’t it scary how a supposedly
> >> deterministic machine can seem so random?
> >>
> >> tim
> >> --
> >> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> >> After a number of decimal places, nobody gives a damn.
> >>
> >>
> >

best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20151210/2afccb83/attachment.htm

More information about the Vm-dev mailing list