This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't block the event loop on context end and related fixes
Previously setTimeout (and co) might block the event loop in cases where timeout hasn't triggered but the context has been done. While fixing that some other potential races were found. Most of them due to trying to write less code - but it is actually important that if we are using the event loop we do all the stuff on it. Additionally fixing a panic in init context if a timer gets interrupted - all due to using the logger from the lib.State. The test added did tease out a bunch of this issues, and does reproduce the original issue *on* occasion. Unfortunately a better reproducible test seems to be very hard to write
- Loading branch information
Showing
2 changed files
with
77 additions
and
8 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