summaryrefslogtreecommitdiff
path: root/meta/3rd/love2d/library/love.thread.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-20 16:40:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-20 16:40:27 +0800
commit4bad35e608179e74c9ce186fa2038573055e574b (patch)
treeb820b8f34ab9e8a92cb6093defaab7f65ee13cbd /meta/3rd/love2d/library/love.thread.lua
parentee83c8939fdb9547bba993132e71a0638949abe9 (diff)
downloadlua-language-server-4bad35e608179e74c9ce186fa2038573055e574b.zip
first step of love2d-api
Diffstat (limited to 'meta/3rd/love2d/library/love.thread.lua')
-rw-r--r--meta/3rd/love2d/library/love.thread.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/3rd/love2d/library/love.thread.lua b/meta/3rd/love2d/library/love.thread.lua
new file mode 100644
index 00000000..e97aaa70
--- /dev/null
+++ b/meta/3rd/love2d/library/love.thread.lua
@@ -0,0 +1,24 @@
+---@class love.thread
+love.thread = {}
+
+---
+---Creates or retrieves a named thread channel.
+---
+---@param name string # The name of the channel you want to create or retrieve.
+---@return Channel channel # The Channel object associated with the name.
+function love.thread.getChannel(name) end
+
+---
+---Create a new unnamed thread channel.
+---
+---One use for them is to pass new unnamed channels to other threads via Channel:push on a named channel.
+---
+---@return Channel channel # The new Channel object.
+function love.thread.newChannel() end
+
+---
+---Creates a new Thread from a filename, string or FileData object containing Lua code.
+---
+---@param filename string # The name of the Lua file to use as the source.
+---@return Thread thread # A new Thread that has yet to be started.
+function love.thread.newThread(filename) end