libev / multiple threads / multiple loops

Jamie Doran jamie.doran81 at gmail.com
Mon Nov 3 16:52:28 CET 2014


Hi Shueng Chuan,

Thank you for your suggestion - it worked a treat.  The callbacks are now
being invoked on the worker threads and I can utilize all cpu cores.

The simple fixes are always the best !

Jamie


On Mon, Nov 3, 2014 at 2:50 PM, KIU Shueng Chuan <nixchuan at gmail.com> wrote:

> It seems from the manpage that you would need to make your constructor
> like the following:
>
> Worker(int id) : m_id(id), m_timer(m_loop)
> { ... }
>
> Otherwise, it defaults to using the default loop.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20141103/6525d5aa/attachment.html>


More information about the libev mailing list