[Python-Dev] Reworking the GIL

Daniel Stutzbach daniel at stutzbachenterprises.com
Mon Nov 2 18:40:29 CET 2009


On Mon, Nov 2, 2009 at 11:27 AM, "Martin v. Löwis" <martin at v.loewis.de>wrote:

> Hmm. This creates a busy wait loop; if you add larger sleep values,
> then it loses accuracy.
>

I thought that at first, too, but then I checked the documentation for
Sleep(0):

"A value of zero causes the thread to relinquish the remainder of its time
slice to any other thread of equal priority that is ready to run."

(this is not to say that I think the solution with Sleep is worthwhile,
though...)

--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20091102/9c0c8ec7/attachment.htm>


More information about the Python-Dev mailing list