Use std::condition_variable_any with timed locking #2365
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When #2267 was made we exclusively used
std::condition_variable
, this only acceptsstd::unique_lock
which made it incompatible with our newnano::unique_lock
. Unaware of alternatives a newcondition_variable
class was made which unfortunately depended on the boostcontext
/fiber
libraries.However I recently discovered that there is a
std::condition_variable_any
class which is less constrained and accepts any BasicLockable type, which is compatible with our classes, so I am now using this which has removed the boost dependencies and some other code.Also removed a CMake warning: