mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
change source dir
This commit is contained in:
16
service/console.lua
Normal file
16
service/console.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
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("Launch:",handle,cmd)
|
||||
end
|
||||
skynet.yield()
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user