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

---@class pub_taskpad
local mt = {}
mt.__index = mt
mt.type = 'pub.taskpad'

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