lua-users home
lua-l archive

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


On 5 Jan 2012, at 23:35, Sam Roberts wrote:
> Its annoying, but your best bet is for your coroutine to yield with
> the amount of time it wants to "sleep".

That's exactly what's done by the LOOP's thread scheduler. If you want to check it out see:

http://loop.luaforge.net/library/thread/SocketScheduler.html
http://loop.luaforge.net/library/thread/CoSocket.html (socket support)
http://loop.luaforge.net/library/thread/Scheduler.html (see function 'suspend([time])')

--
Renato Maia
Computer Scientist
PUC-Rio
__________________________
http://www.inf.puc-rio.br/~maia/