[Python-3000] iostack and sock2

Josiah Carlson jcarlson at uci.edu
Tue Jun 6 21:46:49 CEST 2006

"Giovanni Bajo" <rasky at develer.com> wrote:
> tomer filiba <tomerfiliba at gmail.com> wrote:
> >> You can use WSAAsyncSelect to activate message notification for
> >> socket events, and then wait with MsgWaitForMultipleObjects.
> >
> > i remember reading in the winsock manual that these two methods are
> > slower, and not suitable for servers.
> Might be FUD or outdated: have a link? Anyway, you can't have a long-running
> process which does not poll messages under Windows (the task is immediately
> marked as "not responding"), so I'm not sure what you compare it to, when you
> say "slower". What is the other "faster" method? WSAAsyncEvent? The only other
> way to go I can think of is multithreading (that is exactly how I do write
> servers in Python nowadays).

If I've read the reports correctly, WSA* is technically limited to 512
file handles, and practically limited to fewer (you start getting a
particular kind of exception).  As a suggested replacement, they offer
IO Completion Ports.

 - Josiah

More information about the Python-3000 mailing list