aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/luvref.txt34
1 files changed, 20 insertions, 14 deletions
diff --git a/runtime/doc/luvref.txt b/runtime/doc/luvref.txt
index 131e7889e4..8c842de97a 100644
--- a/runtime/doc/luvref.txt
+++ b/runtime/doc/luvref.txt
@@ -3510,14 +3510,22 @@ uv.thread_setaffinity({thread}, {affinity} [, {get_old_affinity}])
- `[1, 2, 3, ..., n]` : `boolean`
- `get_old_affinity`: `boolean`
- Sets the specified thread's affinity setting. `affinity` must
- be an array-like table where each of the keys correspond to a
- CPU number and the values are booleans that represent whether
- the `thread` should be eligible to run on that CPU. The length
- of the `affinity` table must be greater than or equal to
- `uv.cpumask_size()`. If `get_old_affinity` is `true`, the
- previous affinity settings for the `thread` will be returned.
- Otherwise, `true` is returned after a successful call.
+ Sets the specified thread's affinity setting.
+
+ `affinity` must be a table where each of the keys are a CPU
+ number and the values are booleans that represent whether the
+ `thread` should be eligible to run on that CPU. If the length
+ of the `affinity` table is not greater than or equal to
+ |uv.cpumask_size()|, any CPU numbers missing from the table
+ will have their affinity set to `false`. If setting the
+ affinity of more than |uv.cpumask_size()| CPUs is desired,
+ `affinity` must be an array-like table with no gaps, since
+ `#affinity` will be used as the `cpumask_size` if it is
+ greater than |uv.cpumask_size()|.
+
+ If `get_old_affinity` is `true`, the previous affinity
+ settings for the `thread` will be returned. Otherwise, `true`
+ is returned after a successful call.
Note: Thread affinity setting is not atomic on Windows.
Unsupported on macOS.
@@ -4078,19 +4086,17 @@ uv.metrics_idle_time() *uv.metrics_idle_time()*
uv.metrics_info() *uv.metrics_info()*
Get the metrics table from current set of event loop metrics.
+ It is recommended to retrieve these metrics in a `prepare`
+ callback (see |uv.new_prepare()|, |uv.prepare_start()|) in order
+ to make sure there are no inconsistencies with the metrics
+ counters.
Returns: `table`
- The table contains event loop metrics. It is recommended to
- retrieve these metrics in a uv_prepare_cb in order to make
- sure there are no inconsistencies with the metrics counters.
-
- `loop_count` : `integer`
- `events` : `integer`
- `events_waiting` : `integer`
- Note: New in libuv version 1.45.0.
-
==============================================================================
CREDITS *luv-credits*