diff options
-rw-r--r-- | runtime/doc/luvref.txt | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/runtime/doc/luvref.txt b/runtime/doc/luvref.txt index 66cee0649c..0fdd010880 100644 --- a/runtime/doc/luvref.txt +++ b/runtime/doc/luvref.txt @@ -3360,14 +3360,17 @@ file system operations, as well as `getaddrinfo` and `getnameinfo` requests. uv.new_work({work_callback}, {after_work_callback}) *uv.new_work()* Parameters: - - `work_callback`: `function` + - `work_callback`: `function` or `string` - `...`: `threadargs` passed to/from `uv.queue_work(work_ctx, ...)` - `after_work_callback`: `function` - `...`: `threadargs` returned from `work_callback` Creates and initializes a new `luv_work_ctx_t` (not - `uv_work_t`). Returns the Lua userdata wrapping it. + `uv_work_t`). + `work_callback` is a Lua function or a string containing Lua + code or bytecode dumped from a function. Returns the Lua + userdata wrapping it. Returns: `luv_work_ctx_t userdata` @@ -3468,16 +3471,16 @@ uv.new_thread([{options}, ] {entry}, {...}) *uv.new_thread()* Parameters: - `options`: `table` or `nil` - `stack_size`: `integer` or `nil` - - `entry`: `function` + - `entry`: `function` or `string` - `...`: `threadargs` passed to `entry` Creates and initializes a `luv_thread_t` (not `uv_thread_t`). Returns the Lua userdata wrapping it and asynchronously - executes `entry`, which can be either a Lua function or a Lua - function dumped to a string. Additional arguments `...` are - passed to the `entry` function and an optional `options` table - may be provided. Currently accepted `option` fields are - `stack_size`. + executes `entry`, which can be either a Lua function or a + string containing Lua code or bytecode dumped from a function. + Additional arguments `...` are passed to the `entry` function + and an optional `options` table may be provided. Currently + accepted `option` fields are `stack_size`. Returns: `luv_thread_t userdata` or `fail` |