diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-01-29 19:06:17 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-02-01 20:22:33 +0100 |
commit | 393c19660510f3cd1ac3f9445747ec4c32ec224f (patch) | |
tree | 1c9e57d2917170f1f3bb0e46608f915c46a44544 /doc | |
parent | bcf2886a84407028572fd1084242a1c789c056f8 (diff) | |
download | android-node-v8-393c19660510f3cd1ac3f9445747ec4c32ec224f.tar.gz android-node-v8-393c19660510f3cd1ac3f9445747ec4c32ec224f.tar.bz2 android-node-v8-393c19660510f3cd1ac3f9445747ec4c32ec224f.zip |
worker: refactor thread id management
- Assign thread IDs to `Environment` instances, rather than Workers.
This is more embedder-friendly than the current system, in which
all “main threads” (if there are multiple ones) would get the
id `0`.
- Because that means that `isMainThread === (threadId === 0)` no longer
holds, refactor `isMainThread` into a separate entity. Implement it
in a way that allows for future extensibility, because we use
`isMainThread` in multiple different ways (determining whether there
is a parent thread; determining whether the current thread has control
of the current process; etc.).
PR-URL: https://github.com/nodejs/node/pull/25796
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions