aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/luvref.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/luvref.txt')
-rw-r--r--runtime/doc/luvref.txt58
1 files changed, 47 insertions, 11 deletions
diff --git a/runtime/doc/luvref.txt b/runtime/doc/luvref.txt
index 915b69efe3..2be73f0412 100644
--- a/runtime/doc/luvref.txt
+++ b/runtime/doc/luvref.txt
@@ -837,7 +837,7 @@ uv.new_prepare() *uv.new_prepare()*
Creates and initializes a new |uv_prepare_t|. Returns the Lua
userdata wrapping it.
- Returns: `uv_prepare_t userdata` or `fail`
+ Returns: `uv_prepare_t userdata`
uv.prepare_start({prepare}, {callback}) *uv.prepare_start()*
@@ -882,7 +882,7 @@ uv.new_check() *uv.new_check()*
Creates and initializes a new |uv_check_t|. Returns the Lua
userdata wrapping it.
- Returns: `uv_check_t userdata` or `fail`
+ Returns: `uv_check_t userdata`
uv.check_start({check}, {callback}) *uv.check_start()*
@@ -934,7 +934,7 @@ uv.new_idle() *uv.new_idle()*
Creates and initializes a new |uv_idle_t|. Returns the Lua
userdata wrapping it.
- Returns: `uv_idle_t userdata` or `fail`
+ Returns: `uv_idle_t userdata`
uv.idle_start({idle}, {callback}) *uv.idle_start()*
@@ -977,15 +977,15 @@ called from another thread.
async:send()
<
-uv.new_async([{callback}]) *uv.new_async()*
+uv.new_async({callback}) *uv.new_async()*
Parameters:
- - `callback`: `callable` or `nil`
+ - `callback`: `callable`
- `...`: `threadargs` passed to/from
`uv.async_send(async, ...)`
Creates and initializes a new |uv_async_t|. Returns the Lua
- userdata wrapping it. A `nil` callback is allowed.
+ userdata wrapping it.
Returns: `uv_async_t userdata` or `fail`
@@ -2067,17 +2067,17 @@ uv.pipe({read_flags}, {write_flags}) *uv.pipe()*
uv.pipe_bind2({pipe}, {name}, {flags}) *uv.pipe_bind2()*
> method form `pipe:pipe_bind(name, flags)`
-
+
Parameters:
- `pipe`: `uv_pipe_t userdata`
- `name`: `string`
- - `flags`: `integer` or `table` or `nil`(default: 0)
+ - `flags`: `integer` or `table` or `nil` (default: 0)
Flags:
- If `type(flags)` is `number`, it must be `0` or
`uv.constants.PIPE_NO_TRUNCATE`.
- If `type(flags)` is `table`, it must be `{}` or
- `{ no_trunate = true|false }`.
+ `{ no_truncate = true|false }`.
- If `type(flags)` is `nil`, it use default value `0`.
- Returns `EINVAL` for unsupported flags without performing the
bind.
@@ -2101,7 +2101,7 @@ uv.pipe_connect2(pipe, name, [flags], [callback]) *uv.pipe_connect2()*
Parameters:
- `pipe`: `uv_pipe_t userdata`
- `name`: `string`
- - `flags`: `integer` or `table` or `nil`(default: 0)
+ - `flags`: `integer` or `table` or `nil` (default: 0)
- `callback`: `callable` or `nil`
- `err`: `nil` or `string`
@@ -2110,7 +2110,7 @@ uv.pipe_connect2(pipe, name, [flags], [callback]) *uv.pipe_connect2()*
- If `type(flags)` is `number`, it must be `0` or
`uv.constants.PIPE_NO_TRUNCATE`.
- If `type(flags)` is `table`, it must be `{}` or
- `{ no_trunate = true|false }`.
+ `{ no_truncate = true|false }`.
- If `type(flags)` is `nil`, it use default value `0`.
- Returns `EINVAL` for unsupported flags without performing the
bind operation.
@@ -3630,6 +3630,42 @@ uv.thread_getcpu() *uv.thread_getcpu()*
Returns: `integer` or `fail`
+uv.thread_setpriority({thread}, {priority}) *uv.thread.setpriority()*
+
+ > method form `thread:setpriority(priority)`
+
+ Parameters:
+ - `thread`: `luv_thread_t userdata`
+ - `priority`: `number`
+
+ Sets the specified thread's scheduling priority setting. It
+ requires elevated privilege to set specific priorities on some
+ platforms. The priority can be set to the following constants:
+ - `uv.constants.THREAD_PRIORITY_HIGHEST`
+ - `uv.constants.THREAD_PRIORITY_ABOVE_NORMAL`
+ - `uv.constants.THREAD_PRIORITY_NORMAL`
+ - `uv.constants.THREAD_PRIORITY_BELOW_NORMAL`
+ - `uv.constants.THREAD_PRIORITY_LOWEST`
+
+ Returns: `boolean` or `fail`
+
+uv.thread_getpriority({thread}) *uv.thread.getpriority()*
+
+ > method form `thread:getpriority()`
+
+ Parameters:
+ - `thread`: `luv_thread_t userdata`
+
+ Gets the thread's priority setting.
+
+ Retrieves the scheduling priority of the specified thread. The
+ returned priority value is platform dependent.
+
+ For Linux, when schedule policy is SCHED_OTHER (default),
+ priority is 0.
+
+ Returns: `number` or `fail`
+
uv.thread_self() *uv.thread_self()*
Returns the handle for the thread in which this is called.