-
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.
Fix potential concurrency edge case (#21)
The issue with the select check read and write is that they previously werent wrapped in an atomic block. What can happen is that the check read/write returns true, then the thread gets context switch and another thread violates the invariant that the channel to operate on. By wrapping up all checks and channel operations in atomic blocks, we ensure that this cannot happen.
- Loading branch information
1 parent
9ee648a
commit f764a46
Showing
1 changed file
with
9 additions
and
0 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