doc: note that FreeEnvironment() runs a shared event loop · nodejs/node@79331f5 · GitHub
Skip to content

Commit 79331f5

Browse files
codebytereaduh95
authored andcommitted
doc: note that FreeEnvironment() runs a shared event loop
The embedder docs say each Environment has exactly one `uv_loop_t` and that an `IsolateData` can be shared between Environments, and `CreateIsolateData()` takes the loop, so several same-thread Environments naturally end up on one loop. Nothing mentions that `FreeEnvironment()` then runs that loop, with JavaScript disallowed on the isolate, until the freed Environment's handles are gone, so the other Environments' callbacks can fire inside it. Document that, and point at it from `FreeEnvironment()` in node.h. Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com> PR-URL: #65691 Reviewed-By: Filip Skokan <panva.ip@gmail.com>
1 parent 84ecb21 commit 79331f5

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

‎doc/api/embedding.md‎

Lines changed: 10 additions & 0 deletions

‎src/node.h‎

Lines changed: 3 additions & 0 deletions

0 commit comments

Comments
 (0)