CPython thread starvation
Paul Rubin
no.email at nospam.invalid
Fri Apr 27 16:43:34 EDT 2012
John Nagle <nagle at animats.com> writes:
> I know that the CPython thread dispatcher sucks, but I didn't
> realize it sucked that bad. Is there a preference for running
> threads at the head of the list (like UNIX, circa 1979) or
> something like that?
I think it's left up to the OS thread scheduler, Windows in your case.
See http://www.dabeaz.com/python/NewGIL.pdf starting around slide 18.
One idea that comes to mind is putting a periodic interrupt and signal
handler into your main thread, to make sure the GIL gets released every
so often.
More information about the Python-list
mailing list