diff options
Diffstat (limited to 'server-beta/src/pub/waiter.lua')
-rw-r--r-- | server-beta/src/pub/waiter.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server-beta/src/pub/waiter.lua b/server-beta/src/pub/waiter.lua new file mode 100644 index 00000000..82decbab --- /dev/null +++ b/server-beta/src/pub/waiter.lua @@ -0,0 +1,15 @@ +local thread = require 'bee.thread' + +---@class pub_waiter +local mt = {} +mt.__index = mt +mt.type = 'pub.waiter' + +return function (name) + log.info('Create pub waiter:', name) + thread.newchannel(name) + local waiter = setmetatable({ + channel = thread.channel(name), + }, mt) + return waiter +end |