[racket] FFI question: a callback that will be called by some foreign thread

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Sun Jul 11 10:58:39 EDT 2010

Using FFI, one can use _cprocedure to pass Scheme procedures to foreign 
functions as C callback. For my case, if the callback function is called 
from a different C thread (unknow to PLT FFI), it crashes. Adding 
#:atomic? #t doesn't help. Is there a workaround, or could I conclude 
that FFI can't pass a Scheme procedure to be used as a C callback from 
foreign threads?


Posted on the users mailing list.