summaryrefslogtreecommitdiff
path: root/server-beta/src/pub/brave.lua
blob: 3cfa3e40d51c4ee15787a8547e82a160d6b87581 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
local thread = require 'bee.thread'

---@class pub_brave
local mt = {}
mt.__index = mt
mt.type = 'pub.brave'

return function (name)
    log.info('Create pub brave:', name)
    thread.newchannel(name)
    local brave = setmetatable({
        channel = thread.channel(name),
    }, mt)
    return brave
end