FFI Callbacks

Ron Teitelbaum Ron at USMedRec.com
Fri Sep 1 01:48:18 UTC 2006


I should have said without having to write a plug-in.  

Your suggestion sounds simple for simple notifying callbacks, but for
callback that sends in lots of data and has to interact with the image it
sounds like I'm better off writing the whole thing as a plug in and skip the
FFI.  I guess that means learning some SLANG (how about *#&$*#)

A quick question, if callbacks are supported by the VM, and a plug-in can be
written to handle callbacks couldn't someone (notice I didn't say "I" or
"WE" hoping maybe one of the VM gurus would consider it) combine those
features to write a generalized callback framework that would be available
to the image?  For example it would define the function name return value
and parameters, just like FFI but maybe be called <apicallback: ...>.  Then
that callback could be invoked within a semaphore on a separate thread.

Ron 


> From: Andreas Raab
> Sent: Thursday, August 31, 2006 8:34 PM
> 
> Ron Teitelbaum wrote:
> > I saw that there was work on a call back structure for plug-ins, by any
> > chance has any of this work spilled over into FFI?
> 
> No. The main issue is that for a C callback you need to be able to "pop
> the arguments from the C stack" and there is no support for this yet.
> 
> > I would like to attach to a third party callback from FFI, is that
> possible?
> 
> Yes. You can write a plugin that takes the callback and signals a
> semaphore (or does other interesting things).
> 
> Cheers,
>    - Andreas
> 





More information about the Squeak-dev mailing list