-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup [ci skip]: switch to runtime branching for MT-safe Condition API
Jeff suggested we branch at runtime on whether `Condition` requires the MT-safe API or not. This implements that, to encourage further discussion and experimentation with the API before we finalize the implementation. Thus, in addition to the existing API and usage of `Condition()` (which remain unchanged), this commit adds the option to construct it as a thread-safe variant: `Condition(#=threadsafe=#true)` and `Condition(ReentrantLock())` thereby enabling the same type to be used for both MT and ST usage, and branching the API at runtime based on the additional requirements imposed by MT-safety.
- Loading branch information
Showing
3 changed files
with
14 additions
and
11 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