Not sure why boost::condition_variable and boost::mutex have not already been replaced by newer the stand library equivalents. From what I can tell the behaviour should be the same but perhaps I'm missing something subtle or not.
Replace boost::mutex/condition_variable with std equivalents #16709
pull Bushstar wants to merge 1 commits into bitcoin:master from Bushstar:boost-to-std-mutex changing 2 files +8 −11-
Bushstar commented at 2:07 PM on August 24, 2019: contributor
- fanquake added the label Refactoring on Aug 24, 2019
-
Replace boost::mutex/condition_variable with std equivalents 009f0344ef
- Bushstar force-pushed on Aug 24, 2019
-
DrahtBot commented at 2:53 PM on August 24, 2019: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #16539 (wallet: lower -txmaxfee default from 0.1 to 0.01 BTC by Sjors)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
Bushstar commented at 4:27 PM on August 24, 2019: contributor
Tests failed due to timeouts, please give them a little nudge.
-
promag commented at 12:18 AM on August 25, 2019: member
Restarted failing jobs.
I'm also not aware of differences between boost and std so concept ACK - unless CI failures aren't timeouts but deadlocks or alike.
- Bushstar closed this on Aug 25, 2019
-
Bushstar commented at 8:47 AM on August 25, 2019: contributor
By itself it should be fine however bench and test need to be updated to use the standard library. The problem with that is the lack of interrupt() in std::thread, both bench and test make use of boost::thread::interrupt() via boost::thread_group::interrupt_all(), which previously would have exited threads waiting in boost::condition_variable::wait().
More work is required for a solution that maintains test and bench compatibility without being cumbersome. If a suitable native solution is created boost::thread_group threadGroup variable in init.cpp could also be replaced as well as some tests.
- DrahtBot locked this on Dec 16, 2021