[Vm-beginners] A couple of vm beginner questions

Philip Bernhart philip.bernhart at posteo.de
Mon May 6 20:03:06 UTC 2019


Hi Eliot,

Eliot Miranda <eliot.miranda at gmail.com> writes:
> 3. What is now the supposed "best practice" of adding functionality
>>    to squeak? Say I want to add to it support for password hashing
>>    using libsodium and the library blocks the VM when trying
>>    to do more elaborate calls, so an async call would be much less
>>    of a pain from the user perspective. So async calling in a
>>    FFI library of that code or moving that into a VM plugin so
>>    it's much wider supported?
>>
>
> Ah.  Now that is a long topic.  How much time do you have before you
> urgently need a solution?  The right way is to use the ThreadedFFI but this
> is still in prototype form.  It is something I will put energy into this
> year but the solution won't be ready for months, and that's being
> optimistic.  And we really need to gather a team together around the
> threaded FFI to share the effort and maintain energy and focus.
>
> A "quick hack" is exemplified by the style used in the Windows SocketPlugin
> support; see platforms/win32/plugins/SocketPlugin/sqWin32NewNet.c.  The
> support code manages a set of hidden threads to do lookups and there is a
> pair pf primitives, one to submit a non-blocking lookup request, and
> another to reap the request.  See e.g.
>
> NetNameResolver class>>#primStartLookupOfName:
> NetNameResolver class>>#primAddressLookupResult
> NetNameResolver class>>#primAbortLookup

That's what I implemented doing threads on the C end.
But I'm still waiting for ThreadedFFI. What is the current status?
Some mouthwatering insights? Or the answert to the all encompassing
question of "is it worth it?".


Cheers,
Philip


More information about the VM-beginners mailing list