summaryrefslogtreecommitdiff
path: root/server-beta/src/pub/brave.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-09-19 11:05:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-09-19 11:05:31 +0800
commit253b392a21b3e830f2bb2d2ed56157385017c6a8 (patch)
tree778a961ef1f7e2eedfd1cee329f3b59e3625b01b /server-beta/src/pub/brave.lua
parentc8a0d6924da782ad2c7266c4cf018fcc29c18336 (diff)
downloadlua-language-server-253b392a21b3e830f2bb2d2ed56157385017c6a8.zip
小酒馆
Diffstat (limited to 'server-beta/src/pub/brave.lua')
-rw-r--r--server-beta/src/pub/brave.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/server-beta/src/pub/brave.lua b/server-beta/src/pub/brave.lua
new file mode 100644
index 00000000..3cfa3e40
--- /dev/null
+++ b/server-beta/src/pub/brave.lua
@@ -0,0 +1,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