lua-users home
lua-l archive

Re: Coroutines and blocking IO

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


Hi,
There may be no such way to get an event from a Windows "socket", though,
in which case the only solution is probably to have a back-end that uses
entirely native Windows APIs.
When I want any level of control over files, I skip the stream functions
and use low level fd access instead. Of course, that means I have to do
buffering myself.
The tough part is not to get these things to work, or even to make them
efficient. The problem is to come up with a simple, consistent and
portable interface that will make most people happy.
The next version of LuaSocket will probably support IOCP on Windows. If
it does, it will be in association with a built-in coroutine dispatcher,
similar to the one in Copas. I will avoid using threading as much as
possible.
It is unlikely that I will rewrite Lua's standard IO library to work
with the same dispatcher. But I promise to think about it. I will be
bothering Mike Pall and David Burgess a lot with this subject in a
couple months.
Regards,
Diego.

AltStyle によって変換されたページ (->オリジナル) /