> Is there a better solution here? I would really love to get rid of this

What's wrong with ev_set_loop_release_cb? What you describe looks very much
like the THREAD LOCKING EXAMPLE in the libev documentation.

Also, your solution seems to lack proper locking of the loop - unless ruby
somehow guarantees that you need to avoid two threads running the same
event loop. That could be achieved by putting a (recursive) mutex around
the ev_run call.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to