On 2 December 2012 23:59, drush66 <[email protected]> wrote:
> Would it be possible to start native thread inside pharo? This thread would
> run (for quite a long time) some event loop (like the libev), and post some
> info to the SharedQueue. Smalltalk code would in turn be reading stuff from
> this queue. You could say it would be pumping events from libev to
> SharedQueue instance for Smalltalk code to consume.
>
> Is this doable? With NativeBoost or Plugin?
>
> I have also found some info on threaded VM, but if I understand it correctly
> it seems more oriented to provide a thread to execute FFI call on it.
>
I have  a prototype for worker thread loop implemented in NB..
The idea is to call some function in that thread and then signal a
semaphore when call complete.

And of course making VM thread to be 'owned' by non-main thread needs
to be supported.
The main problem with this approach is that some primitives/functions
has to be invoked in main thread..
and to control that, it will require some work in VM/language side to
fulfill such requirement.
The hard part of it, that we have barrier between language and VM, and
lack of coordination to manage and correct usage of native threads.

-- 
Best regards,
Igor Stasenko.

Reply via email to