You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments