Re:using libev with multiple threads

2013-02-03 Thread 钱晓明
I am happy to see this e-mail because I can contribute some thing :-)... This is exactly the same need for me and I write some code to do this. They are in attachment files. The key to accomplish this goal is: 1. create new event loop for per worker thread, with a pipe and a extra ev_io to watch

Re: using libev with multiple threads

2013-02-03 Thread Tony Arcieri
Hello there, I use libev as part of a multithreaded system in Ruby called Celluloid::IO. libev itself is specifically wrapped by this gem, which provides a cross-platform wrapper between CRubies (which use libev) and JRuby (which uses Java NIO): https://github.com/tarcieri/nio4r I can't say I've