mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
Add new sharetable
This commit is contained in:
10
test/testsharetable.lua
Normal file
10
test/testsharetable.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
local skynet = require "skynet"
|
||||
local sharetable = require "skynet.sharetable"
|
||||
|
||||
skynet.start(function()
|
||||
sharetable.load("test", "return { x=1,y={ 'hello world' },['hello world'] = true }")
|
||||
local t = sharetable.query("test")
|
||||
for k,v in pairs(t) do
|
||||
print(k,v)
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user