On Sat, Feb 14, 2015 at 03:47:01PM +0100, Rick van Rein <[email protected]>
wrote:
> The ideal is to run this pthread_yield() once per thread, just before
> returning to poll() — calling it from every callback function is
And just before anybody reads this mail out of context - pthread_yield
will *not* give other threads opportunity to run in general, anywhere, and
on some systems (e.g. GNU/Linux) will temporarily give your thread lowest
priority in the system. You really do not want to implement this hack.
> This stuff is fun :-D
It's actually a bit painful...
> It’s a pitty libev doesn’t do all this yet though; it feels like a
> natural extension to me.
libev doesn't do that because it is horribly inefficient and broken by
design - libev shouldn't enforce an inefficient model, but allow users to
implement efficient ones themselves.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / [email protected]
-=====/_/_//_/\_,_/ /_/\_\
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev