hello,

I have a big dll which is working with sockets and
so on.
I'v wrote a wrapping-extension for this dll and there is a
problem that ruby crash.

the dll has a worker thread which is waiting for 
data. On arrival of some data the thread calls a ruby
block with 
rb_funcall(block, rb_intern("call"), 1, INT2NUM(n) );
If I do this ruby crash.

The callback is asynchronous.

There a two ways:
 - find a way to call the block from this foreign thread
 - poll in a ruby thread.

The second way is very ugly.

Is there a way in ruby to synchronize this?


daniel