lua-users home
lua-l archive

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


--- Edgar Toernig <froese@gmx.de> wrote:
> And how do you "peek" into stdio's input buffer?
> 
would io.stdin:read('*a') a way to peek ? As my
understanding is that '*a' is effectively
non-blocking(just return as much as there). Or may be
not if there is nothing to read(which would be
blocked) ? 

But that still don't solve the write() can be
blocking.

So I still think in lua, COPAS(effectively cooperative
multithreading as you said) is the natural way to have
deadlock free bi-directional communication for things
like popen2.


       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow