diff options
Diffstat (limited to 'meta/3rd/luv/library/uv_prepare_t.lua')
-rw-r--r-- | meta/3rd/luv/library/uv_prepare_t.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/3rd/luv/library/uv_prepare_t.lua b/meta/3rd/luv/library/uv_prepare_t.lua new file mode 100644 index 00000000..91e3231b --- /dev/null +++ b/meta/3rd/luv/library/uv_prepare_t.lua @@ -0,0 +1,30 @@ +---@meta + +--- Prepare handles will run the given callback once per loop iteration, right +--- before polling for I/O. +--- +--- ```lua +--- local prepare = uv.new_prepare() +--- prepare:start(function() +--- print("Before I/O polling") +--- end) +--- ``` +--- +---@class uv.uv_prepare_t : uv.uv_handle_t +--- +local prepare + +--- Start the handle with the given callback. +--- +---@param callback function +---@return 0|nil success +---@return uv.error.message|nil err +---@return uv.error.name|nil err_name +function prepare:start(callback) end + +--- Stop the handle, the callback will no longer be called. +--- +---@return 0|nil success +---@return uv.error.message|nil err +---@return uv.error.name|nil err_name +function prepare:stop() end
\ No newline at end of file |