David Beazley <d...@dabeaz.com> added the comment:

Greg,

I like the idea of the monitor suspending if no thread owns the GIL.  Let me 
work on that.   Good point on embedded systems.

Antoine, 

Yes, the gil monitor is completely independent and simply ticks along every 5 
ms.   A worst case scenario is that an I/O bound thread is scheduled shortly 
after the 5ms tick and then becomes CPU-bound afterwards.  In that case, the 
monitor might let it run up to about 10ms before switching it.  Hard to say if 
it's a real problem though---the normal timeslice on many systems is 10 ms so 
it doesn't seem out of line.  

As for the priority part, this patch should have similar behavior to the 
glinter patch except for very subtle differences in thread scheduling due to 
the use of the GIL monitor.  For instance, since threads never time out on the 
condition variable anymore, they tend to cycle execution in a purely 
round-robin fashion.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7946>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to