lua-users home
lua-l archive

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

Looks great. I will stop writing the code I had in mind.
>It seems there are subtle distinctions between C runtime handles
>and true Windows object handles. Please someone tell us in detail which
>can be used in what ways with which backend event-selector call
>(WaitForMultipleObjects or select).

Async IO in Windows has many faces. Some good, some not
so good.

Overlapped IO would seem to be the way to go for socket IO.
There are many options for implementing Overlapped IO in
your event based model. IOCompletionPorts are my preferred
option. Variant behaviour exists across Win9x/NT/2000/XP/2003.
If we can ignore 95/me then life is not too bad.

Trouble is guaranteed if you mix the various IO mechanisms 
available on Windows. Use either Windows API or the C runtime
not both.

I would not attempt to describe how to use Windows Overlapped
socket IO in this limited space.

Signals aside. Most of the Unix select/poll/kqueue/devpoll 
functionality can be emulated in Windows.

Given the description of your event API, methinks it would 
not be too difficult to provide WIndows Overlapped IO and
IO Completion Port support.

Diegos current socket abstraction hides most (if not all) of
the OS dependencies in wsocket.c. I see no reason why the
Event API could not do the same.

This would be most cool.