Pharo 4 FFI asynchronous callbacks

What are the options (if any) for handling FFI asynchronous callbacks in Pharo 4? By asynchronous, I mean the callback is called by the foreign language library sometime after the FFI function that sets the callback has completed and returned to Smalltalk.

The example NativeBoost callbacks in the image is synchronous (the callback happens during the execution of the FFI function), will it work for asynchronous callbacks too?

Or maybe one of the older FFI mechanisms can handle this situation?

Than there is CogMT, which, if I understood, could handle this case, but also much more. Can Pharo 4 run with this virtual machine?

+3


source to share


2 answers


There is no way in Faro to do it right now :(



CogMT is experimental and cannot be used for real at the moment, we are working on ThreadedFFI, which is what you ask, but it won't be ready until the end of the year (hopefully).

+2


source


All current efforts are related to the migration to Spur VM (and ARM Cog). It's much faster and offers pinned objects (next to 64-bit images). It offers new possibilities, which, however, are not fully compatible with existing equipment. Also, NativeBoost is currently x86 specific and will require changes for both x64 and ARM.



+1


source







All Articles