thank you very much, i totally disregarded the ev_set_loop_release_cb() function, and let the loop lock the loop_lock. what i do not understan is the ev_async to wake up the loop, i will read about waking up the loop when adding new/removing new watchers i guess that will be useful at program exit right ?
On 13 June 2011 16:20, Brandon Black <[email protected]> wrote: > On Mon, Jun 13, 2011 at 4:23 PM, Juan Pablo L > <[email protected]> wrote: >> attached is source for database pool module, > > The locking is insufficient. See > http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#THREAD_LOCKING_EXAMPLE > . At the very least, you need to add hooks via > ev_set_loop_release_cb() so that ev_run() uses your loop lock and > releases it when not waiting, and an empty ev_async watcher to notify > the loop of changes (add/remove watchers). There could be other > problems lurking as well, I didn't look too deep. > _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
