mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
bugfix: timeout
This commit is contained in:
@@ -3,7 +3,12 @@ local skynet = require "skynet"
|
||||
-- register a dummy callback function
|
||||
skynet.dispatch()
|
||||
|
||||
local function timeout(t)
|
||||
print(t)
|
||||
end
|
||||
|
||||
skynet.start(function()
|
||||
skynet.timeout(500, timeout, "Hello World")
|
||||
for i = 1, 10 do
|
||||
print(i)
|
||||
skynet.sleep(100)
|
||||
|
||||
Reference in New Issue
Block a user