Subject:
[ruby-ffi] callback from native thread
From:
JackNorris
Date:
12/19/11 11:32 AM
To:
ruby-ffi

I am looking to write an asynchronous ICMP/Ping library to use with
Ruby + FFI.

I've not really started writing anything yet I am just curious if FFI
can handle callbacks from threads that were not created by Ruby. My
plan is to create a new thread running a libevent loop and call back
to Ruby when an event occurs (ie a ping response). This leaves the
ruby thread open to control libevent.

It would appreciated if anyone could advise me on this, specifically
if calling back in such a way will work.
Maybe I am just going about the whole thing the wrong way! :-)