Driving a thread pool from libev

Rick van Rein rick at openfortress.nl
Sun Feb 15 15:55:14 CET 2015

Hello Marc,

To summarise, I tried to save a memcpy() but it inevitably backfires with more
costly user/kernel interactions.  Thanks for clarifying that.

I overlooked that pthread_yield() is a technique from single-core CPU days.
My mentioning of spinlocks was based the same oversight.  Again, thanks for
pointing that out.

I fear I cannot continue to use one thread per TLS session; this works fine for
the short-lived connections of HTTP and SMTP, but the thread stack requirements
are likely to become a bottleneck for IMAP, XMPP or other long-lived, low-traffic


More information about the libev mailing list