[cffi-devel] Thread callback problem

Luke J Crook luke at balooga.com
Wed Jun 17 01:21:42 UTC 2009


On Tue, 16 Jun 2009 17:23:50 -0700, Bodhi <bodhi at 5263.org> wrote:

> According to the thread I can't callback into lisp on a non-lisp-created
>   thread. Is there anyway to 'bless' a thread so i can callback to lips?

Corman Common Lisp FFI allows a thread to be blessed. I don't know if any  
other Lisp supports this though.

> Or is the only way to  buffer the input in the C thread and then access
> it from a separate lisp thread? (I'm a lisp beginner using SBCL by the
> way.)

I had to write a C wrapper library to handle the callback. The wrapper  
library then calls back into the Lisp process.

> Maybe it would be nice to put a note in the callback part of the CFFI
> manual warning about this gotcha?

It bit me so a note would be a good idea, I think.

- Luke




More information about the cffi-devel mailing list