[Python-Dev] Fixing the GIL (with a BFS scheduler)

Antoine Pitrou solipsis at pitrou.net
Mon May 17 23:44:59 CEST 2010


Le lundi 17 mai 2010 à 14:36 -0700, Bill Janssen a écrit :
> 
> Could the macro that releases the GIL also release the thread affinity?

We release the GIL in a variety of situations which don't necessarily
involve heavy computations (such as: waiting for IO or sleeping).
Furthermore, having several threads taking / dropping the GIL would make
the affinity setting / unsetting pattern quite chaotic.

Really, I think the processor affinity solution can only be
application-specific. There doesn't seem to be an easy, generic way of
guessing whether some kind of processor affinity should be requested or
not.

Regards

Antoine.




More information about the Python-Dev mailing list