Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use std::condition_variable_any with timed locking #2365

Merged
merged 1 commit into from
Oct 28, 2019

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented Oct 25, 2019

When #2267 was made we exclusively used std::condition_variable, this only accepts std::unique_lock which made it incompatible with our new nano::unique_lock. Unaware of alternatives a new condition_variable class was made which unfortunately depended on the boost context/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:

CMake Warning (dev) at CMakeLists.txt:35 (set):
implicitly converting 'NUMBER' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

@wezrule wezrule added documentation This item indicates the need for or supplies updated or expanded documentation quality improvements This item indicates the need for or supplies changes that improve maintainability labels Oct 25, 2019
@wezrule wezrule requested a review from cryptocode October 25, 2019 11:14
@wezrule wezrule self-assigned this Oct 25, 2019
wezrule added a commit to nanocurrency/nano-docs that referenced this pull request Oct 25, 2019
@wezrule wezrule merged commit 30b7cf9 into nanocurrency:master Oct 28, 2019
@wezrule wezrule deleted the use_condition_variable_any branch October 28, 2019 09:53
guilhermelawless pushed a commit to nanocurrency/nano-docs that referenced this pull request Oct 30, 2019
@argakiig argakiig added this to the V20.0 milestone Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This item indicates the need for or supplies updated or expanded documentation quality improvements This item indicates the need for or supplies changes that improve maintainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants