Suraj N. Kurapati wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Asterix Gallier wrote:
>> I would like to send a signal from c to ruby. So that ruby knows,
>> that there is some new data in c that can be fetched and
>> extracted.
> 
> How about raising an exception from your C code and catching it in
> your Ruby code?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
> 
> iD8DBQFEyt14mV9O7RYnKMcRAhQAAJ4uNmwrApn+JQaXohcp1aHebcRxIwCfW2E0
> z2Z+Ev5KbcEjUsrujWod3vI=
> =Uore
> -----END PGP SIGNATURE-----

I haven't tried your solution, but I would be surprised if a Ruby 
exception turned out to be thread-safe across a native thread.

-- 
Posted via http://www.ruby-forum.com/.