need some detail about ev_async.

马承珂 fatmck at 163.com
Mon Nov 21 09:14:53 CET 2011


Hi.
I am writing an server application which is doing heavy and slow database work. I use some worker threads to do these work, each thread has a circular lock-free queue used to receive SQL statement, and has another circular queue used to put the execution result of the SQL statement. 
As a result of this design, in the main thread, I need to tell the worker threads that there are some SQL statements in the circular queue. and after query done, worker threads need to tell the main thread to fetch result. I want to use ev_async to implement the "tell" work, so I want to know is there any mutext or lock in ev_async functions? will a thread be blocked when calling ev_async functions? what low-level api does ev_async used on Linux platform?
Or any suggestion on my application? any better design?
Thanks very much.


sorry for my english, thanks for reading this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20111121/6b18e279/attachment.html>


More information about the libev mailing list