[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Nonblocking stdio
- From: Diego Nehab <diego@...>
- Date: Thu, 4 May 2006 19:20:22 -0400 (EDT)
Hi,
I have a lua application on unix which reads from stdio - there is some
significant work it could do if there is no input. I thought about kludging
up a shim which would read from stdio, and write to a socket, from which my
app could read from in non-blocking mode using the luasocket facilities.
It would be nice if the stdio facilities could use the luasocket 'select'
interface, etc. Any ideas?
It would be nice, indeed.
Unfortunately, on Windows, select only supports sockets.
Even on Unix, passing the file descriptor used by a stdio
FILE * to select would be problematic due to input/output buffering.
LuaSocket does its own buffering, so I know exactly what is
going on.
[]s,
Diego.