Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dab64bb

Browse filesBrowse files
addaleaxrvagg
authored andcommitted
worker: spin uv_run twice before closing loop
On Windows, the Platform’s `uv_async_t` may need two iterations before closing when it was previously in use. Refs: #26089 Refs: #26006 PR-URL: #26138 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent d550de4 commit dab64bb
Copy full SHA for dab64bb

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎src/node_worker.cc‎

Copy file name to clipboardExpand all lines: src/node_worker.cc
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ class WorkerThreadData {
150150

151151
isolate->Dispose();
152152

153-
// Need to run the loop one more time to close the platform's uv_async_t
153+
// Need to run the loop twice more to close the platform's uv_async_t
154+
// TODO(addaleax): It would be better for the platform itself to provide
155+
// some kind of notification when it has fully cleaned up.
156+
uv_run(&loop_, UV_RUN_ONCE);
154157
uv_run(&loop_, UV_RUN_ONCE);
155158

156159
CheckedUvLoopClose(&loop_);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.