Subject:
[ruby-ffi] Re: callback from native thread
From:
Wayne Meissner
Date:
12/20/11 7:01 AM
To:
ruby-ffi@googlegroups.com

Whilst that would work fine in JRuby, non-ruby callbacks in CRuby are best described as "delicate" (ie. they work, but avoid that scenario if you can).

You can also mark a ruby method as 'blocking' (tag it with @blocking = true before the attach_function call), so you could call libevent from ruby without blocking the interpreter, but once again, on CRuby, (mainly 1.8.x), it is not recommended.