summaryrefslogtreecommitdiff
path: root/meta/3rd/luv/library/uv_check_t.lua
blob: 3c131ba9da696b14b9e9c3a90ab3b4cb20d34481 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---@meta

--- Check handles will run the given callback once per loop iteration, right after
--- polling for I/O.
---
--- ```lua
--- local check = uv.new_check()
--- check:start(function()
---   print("After I/O polling")
--- end)
--- ```
---
---@class uv.uv_check_t : uv.uv_handle_t
local check

--- 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 check: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 check:stop() end