lua-users home
lua-l archive

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


Hi,

Unfortunately, on Windows, select only supports sockets.

Does libevent work on Windows?

I don't know about libevent.

But there are other ways to wait on sockets and files
on Windows that do not involve calling the select function
and are *very* efficient. What I am saying is that the select function on Windows, which is provided by WinSock, only supports sockets.

People went through a lot of trouble trying to provide a
compatible implementation of select in cygwin. Their
approach, if I remember correctly, involves sorting all
"descriptors" into groups (sockets, files etc), then
spawning one auxiliar thread to wait on each group, then waiting on these threads with a timeout, and finally consolidating the results.

I am sure whoever implemented this had no other choice and
needed a long shower when he/she was done.

Regards,
Diego.