Skip to content

Commit 419876a

Browse files
addaleaxtargos
authored andcommittedOct 18, 2017
src: fixup node_platform blocking task drain
#15428 was supposed to account for upcoming changes in V8 upstream, but while addressing review comments a bug was introduced; `DrainBackgroundTasks()` should always at least perform one blocking drain on the background task queue. PR-URL: #15639 Refs: #15428 Refs: f27b5e4 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 33d5262 commit 419876a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/node_platform.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ static void RunForegroundTask(uv_timer_t* handle) {
8686
}
8787

8888
void NodePlatform::DrainBackgroundTasks() {
89-
while (FlushForegroundTasksInternal())
89+
do {
9090
background_tasks_.BlockingDrain();
91+
} while (FlushForegroundTasksInternal());
9192
}
9293

9394
bool NodePlatform::FlushForegroundTasksInternal() {

0 commit comments

Comments
 (0)
Please sign in to comment.