lua-users home
lua-l archive

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


On 1/26/06, Diego Nehab <diego@tecgraf.puc-rio.br> wrote:
> 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.

That's what I find neat about the Ruby solution. From Ruby the IO
looks like it is synchronous. All of the select/poll and IO thread
logic is hidden in C code and invisible to the Ruby programmer. There
is no Ruby API for async IO.

--
Jon Smirl
jonsmirl@gmail.com