[Twisted-Python] WaitForMultipleObjects socket limitation

Kevin Horn kevin.horn at gmail.com
Thu Apr 7 20:52:44 MDT 2011


On Thu, Apr 7, 2011 at 1:23 PM, Glyph Lefkowitz <glyph at twistedmatrix.com>wrote:

>
> On Apr 7, 2011, at 12:16 PM, anatoly techtonik wrote:
>
> > I've made a proof of concept for asynchronous console input on Windows
> > [1] and now I am trying to understand the limits of
> > WaitForMultipleObjects API I've used.
> >
> > Documentation on win32eventreactor mentions limit for 64 objects:
> >
> http://twistedmatrix.com/documents/11.0.0/api/twisted.internet.win32eventreactor.htm
> > However, it is completely opaque what these objects are? For console
> > handles and process handles it is quite obvious, but not for sockets.
> >
> > Is 64 the limit for total amount sockets opened on different ports?
> > Is 64 the limit for connections made to a socket on specified port?
> >
> > 1.
> http://techtonik.rainforce.org/2011/03/asynchronous-input-from-windows-console.html
>
> 64 is the limit for the total number of objects (listening ports,
> connections to a port, client connections, your console, the waker, serial
> ports, whatever) that WFMO may wait upon at once.
>
> Put another way, MAXIMUM_WAIT_OBJECTS=64:
> http://msdn.microsoft.com/en-us/library/ms687025(v=vs.85).aspx
>
>
Note that you can wait on more than 64 objects at a time, just not using a
single WaitForMultipleObjects call.  The MSDN page Glyph pointed out has a
little more info.

Kevin Horn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20110407/9eff711f/attachment-0001.html>


More information about the Twisted-Python mailing list