lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Lisa Parratt wrote:

This is highly misleading. Yes, select() only supports sockets on Windows.

However, that's simply because you're using the wrong function - you should be using WaitForObjects(). When it comes to blocking on events, Windows makes the Unix API look like the utter toy it is.

A clarification - the windows WaitForMultipleObjects call you refer to still has a limit of MAXIMUM_WAIT_OBJECTS handles : that number is, surprise surprise, 64.

Real high-performance i/o on windows requires io completion ports : my xp box runs out of buffers for o/lapped io at 3,976 open sockets x 2 (client+server apps).

The real design issue anyway is how to structure Lua apps around nonblocking io / events : how to schedule coroutines, associate them with events, add extension libraries etc.

Adrian