summaryrefslogtreecommitdiff
path: root/meta/3rd/luv/library/luv_work_ctx_t.lua
diff options
context:
space:
mode:
Diffstat (limited to 'meta/3rd/luv/library/luv_work_ctx_t.lua')
-rw-r--r--meta/3rd/luv/library/luv_work_ctx_t.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/3rd/luv/library/luv_work_ctx_t.lua b/meta/3rd/luv/library/luv_work_ctx_t.lua
new file mode 100644
index 00000000..790db995
--- /dev/null
+++ b/meta/3rd/luv/library/luv_work_ctx_t.lua
@@ -0,0 +1,17 @@
+---@meta
+
+--- luv_work_ctx_t
+---
+---@class uv.luv_work_ctx_t : userdata
+local work_ctx
+
+--- Queues a work request which will run `work_callback` in a new Lua state in a
+--- thread from the threadpool with any additional arguments from `...`. Values
+--- returned from `work_callback` are passed to `after_work_callback`, which is
+--- called in the main loop thread.
+---
+---@param ... uv.threadargs
+---@return boolean|nil success
+---@return uv.error.message|nil err
+---@return uv.error.name|nil err_name
+function work_ctx:queue(...) end \ No newline at end of file