-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix promise sync in bool_waiter; rename to callback_waiter
We were setting the promise in bool_waiter *before* we call the wrapped lambda, but that introduces a race condition because we have test code that waits on the promise and then checks a value that it expects to have been set inside the lambda. This reverses it so that the promise is set *after* the lambda is called. While here, I also refactored this to a `promise<void>` since we are never actually meaningfully using the `bool` value (which either returns true, or hangs), and then since it isn't a "bool" waiter anymore, renamed to callback_waiter. Also documented its usage.
- Loading branch information
Showing
5 changed files
with
65 additions
and
36 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
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