[issue7946] Convoy effect with I/O bound threads and New GIL

Gregory P. Smith report at bugs.python.org
Mon Apr 26 07:23:28 CEST 2010


Gregory P. Smith <greg at krypto.org> added the comment:

Nice dabeaz.

One potential concern with "dabeaz_gil.patch 2010-04-25 21:13" is that it appears to always leave the gil_monitor thread running.  This is bad on mobile/embedded platforms where waking up at regular intervals prevents advanced sleep states and wastes power/battery.  (practical example: the OLPC project has run into this issue in other code in the past)

Could this be modified so that gil_monitor stops looping (blocks) so long as there are only IO bound Python threads running or while no python thread owns the GIL?

In that situation a multithreaded python process that has either reverted to one thread or has all threads blocked in IO would be truly idle rather than leaving the gil_monitor polling.

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7946>
_______________________________________


More information about the Python-bugs-list mailing list