mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
17 lines
271 B
Lua
17 lines
271 B
Lua
local skynet = require "skynet"
|
|
|
|
skynet.dispatch()
|
|
|
|
skynet.start(function()
|
|
while true do
|
|
local cmd = io.read()
|
|
local handle = skynet.launch(cmd)
|
|
if handle == nil then
|
|
print("Launch error:",cmd)
|
|
else
|
|
print("Lauch:",handle)
|
|
end
|
|
skynet.yield()
|
|
end
|
|
end)
|