Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: new_work & new_thread string argument #635

Merged
merged 1 commit into from
Mar 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3156,13 +3156,14 @@ work:queue(1, 2)
### `uv.new_work(work_callback, after_work_callback)`

**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.
Creates and initializes a new `luv_work_ctx_t` (not `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`

Expand Down Expand Up @@ -3259,12 +3260,12 @@ Libuv provides cross-platform implementations for multiple threading an
**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 `...`
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`.

Expand Down