Skip to content

Commit

Permalink
patch the underlying problem directly in uv
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Aug 31, 2022
1 parent 6337830 commit 2edf2ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions deps/uv/src/unix/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,19 +398,6 @@ int uv_run(uv_loop_t* loop, uv_run_mode mode) {
uv__run_check(loop);
uv__run_closing_handles(loop);

if (mode == UV_RUN_ONCE) {
/* UV_RUN_ONCE implies forward progress: at least one callback must have
* been invoked when it returns. uv__io_poll() can return without doing
* I/O (meaning: no callbacks) when its timeout expires - which means we
* have pending timers that satisfy the forward progress constraint.
*
* UV_RUN_NOWAIT makes no guarantees about progress so it's omitted from
* the check.
*/
uv__update_time(loop);
uv__run_timers(loop);
}

r = uv__loop_alive(loop);
if (mode == UV_RUN_ONCE || mode == UV_RUN_NOWAIT)
break;
Expand Down
2 changes: 1 addition & 1 deletion src/api/embed_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool SpinEventLoopWithoutCleanup(Environment* env,
if (env->is_stopping()) return false;
int loop;
do {
loop = uv_run(env->event_loop(), UV_RUN_NOWAIT);
loop = uv_run(env->event_loop(), UV_RUN_ONCE);
} while (loop && condition() && !env->is_stopping());
if (env->is_stopping()) return false;

Expand Down

0 comments on commit 2edf2ea

Please sign in to comment.