[Python-Dev] Reworking the GIL
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Mon Oct 26 23:45:25 CET 2009
On 04:18 pm, daniel at stutzbachenterprises.com wrote:
>On Mon, Oct 26, 2009 at 10:58 AM, Antoine Pitrou
><solipsis at pitrou.net>wrote:
>>Er, I prefer to keep things simple. If you have lots of I/O you should
>>probably
>>use an event loop rather than separate threads.
>
>On Windows, sometimes using a single-threaded event loop is sometimes
>impossible. WaitForMultipleObjects(), which is the Windows equivalent
>to
>select() or poll(), can handle a maximum of only 64 objects.
This is only partially accurate. For one thing, WaitForMultipleObjects
calls are nestable. For another thing, Windows also has I/O completion
ports which are not limited to 64 event sources. The situation is
actually better than on a lot of POSIXes.
>Do we really need priority requests at all? They seem counter to your
>desire for simplicity and allowing the operating system's scheduler to
>do
>its work.
Despite what I said above, however, I would also take a default position
against adding any kind of more advanced scheduling system here. It
would, perhaps, make sense to expose the APIs for controlling the
platform scheduler, though.
Jean-Paul
More information about the Python-Dev
mailing list