forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: don't call uv_run() after 'exit' event
It makes timers and other libuv handles fire intermittently after the 'exit' event, contrary to what the documentation states. Regression introduced in commit aac79df ("src: use stack-allocated Environment instances") from June last year that made the `while (handle_cleanup_waiting_ != 0) uv_run(event_loop(), UV_RUN_ONCE)` loop run unconditionally on exit because it merged CleanupHandles() into the Environment destructor. This change breaks parallel/test-async-wrap-throw-from-callback because the async_wrap idle handle is no longer cleaned up, which I resolved pragmatically by removing the test. In all seriousness, it is being removed in the upcoming async_wrap revamp - it doesn't make sense to sink a lot of time in it now. Fixes: nodejs#12322 PR-URL: nodejs#12344 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
- Loading branch information
1 parent
d7ea036
commit 3fb8537
Showing
6 changed files
with
34 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use strict'; | ||
require('../common'); | ||
|
||
process.on('exit', () => { | ||
setTimeout(process.abort, 0); // Should not run. | ||
for (const start = Date.now(); Date.now() - start < 10; /* Empty. */); | ||
}); |