luaLFS 1.01 (repeat's Changes)

09-Mar-2010

[*] polling -  in config `polling` time interval, in milliseconds.
[+] EVT_THREAD - Event starts at each packet received or a period equal to `polling` (see config).
[*] luaLFS.sleep(x) -  This makes luaLFS sleep for X milliseconds.
[*] Powered By Lua 5.1.4




Example: something like thread process
----------------------- CUT -----------------------
proc1 = coroutine.create(function ()
	while true do
		print("execute proc1")
		coroutine.yield()
	end
end)

proc2 = coroutine.create(function ()
	while true do
		print("execute proc2")
		coroutine.yield()
	end
end)


function thread()
	coroutine.resume(proc1)
	coroutine.resume(proc2)
end
evt_bind(EVT_THREAD, thread)
----------------------- CUT -----------------------
