-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Context, Shutdown Callback, Condition Var per call
The `Clock` doesn't have enough information to know which Context should wake it on shutdown, so this adds a Context as an argument to sleep_until(). Since the context is per call, the shutdown callback is also registered per call and cannot be stored on impl_. The condition_variable is also unique per call to reduce spurious wakeups when multiple threads sleep on the same clock.
- Loading branch information
Showing
2 changed files
with
30 additions
and
15 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