-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: execute select actions inside their own fiber
In some scenarios, for example concurrent send actions to buffered channels, it was possible to enqueue the current fiber *many* times which led to segfaults, trying to resume a dead fiber or to switch to the currently running fiber. All channels actions are now performed inside a dedicated fiber, so the wait operation is safe (on a single thread). Still not MT-safe: select actions need to compete on an atomic flag when ready, and be resilient to a failed execution (e.g. another thread already sent/receive from the channel).
- Loading branch information
1 parent
6e225d8
commit f4b0854
Showing
2 changed files
with
115 additions
and
24 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