Page MenuHomePhabricator

refactor: remove boost::thread_group usage
ClosedPublic

Authored by PiRK on Feb 4 2022, 14:37.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC5d1d773738a0: refactor: remove boost::thread_group usage
Summary

Post core#18710, there isn't much left using boost::thread_group, so should just be able to replace it with the standard library. This also removes the last use of boost::thread_interrupted.

After this change, last piece of Boost Thread we'd be using is boost::shared_mutex. See the commentary here as to why it may be non-trivial to swap that for std::shared_mutex in the near future.

This is a backport of core#21016 and core#22433

Test Plan

With clang + debug and (separate run) TSAN
ninja && ninja check check-functional

Event Timeline

PiRK requested review of this revision.Feb 4 2022, 14:37

Tail of the build log:

[168/454] Running pow test suite
PASSED: pow test suite
[169/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/ismine_tests.cpp.o
[170/454] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.010s

OK
[171/454] cd /work/contrib/devtools/chainparams && /usr/bin/python3.7 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[172/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/scriptpubkeyman_tests.cpp.o
[173/454] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/parse_name_tests.cpp.o
[174/454] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/p2p_messaging_tests.cpp.o
[175/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/walletdb_tests.cpp.o
[176/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/psbt_wallet_tests.cpp.o
[177/454] Automatic MOC for target test_bitcoin-qt
[178/454] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/write_name_tests.cpp.o
[179/454] Test Bitcoin utilities...
[180/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/coinselector_tests.cpp.o
[181/454] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/message_writer_tests.cpp.o
[182/454] Linking CXX executable src/seeder/test/test-seeder
[183/454] seeder: testing write_name_tests
[184/454] Running utility command for check-seeder-write_name_tests
[185/454] seeder: testing options_tests
[186/454] Running utility command for check-seeder-options_tests
[187/454] seeder: testing message_writer_tests
[188/454] Running utility command for check-seeder-message_writer_tests
[189/454] seeder: testing p2p_messaging_tests
[190/454] Running utility command for check-seeder-p2p_messaging_tests
[191/454] seeder: testing parse_name_tests
[192/454] Running utility command for check-seeder-parse_name_tests
[193/454] Running seeder test suite
PASSED: seeder test suite
[194/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/util.cpp.o
[195/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/bitcoinaddressvalidatortests.cpp.o
[196/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/compattests.cpp.o
[197/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/util_tests.cpp.o
[198/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/guiutiltests.cpp.o
[199/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_tests.cpp.o
[200/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_bitcoin-qt_autogen/mocs_compilation.cpp.o
[201/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/uritests.cpp.o
[202/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_main.cpp.o
[203/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/apptests.cpp.o
[204/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/rpcnestedtests.cpp.o
[205/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.o
[206/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.o
[207/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.o
[208/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[209/454] Linking CXX executable src/qt/test/test_bitcoin-qt
[210/454] bitcoin-qt: testing test_bitcoin-qt
[211/454] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[212/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1

Tail of the build log:

[167/456] Automatic MOC for target bitcoin-qt-base
[168/454] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/options_tests.cpp.o
[169/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/scriptpubkeyman_tests.cpp.o
[170/454] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.005s

OK
[171/454] cd /work/contrib/devtools/chainparams && /usr/bin/python3.7 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[172/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/ismine_tests.cpp.o
[173/454] Automatic MOC for target test_bitcoin-qt
[174/454] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/parse_name_tests.cpp.o
[175/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/psbt_wallet_tests.cpp.o
[176/454] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/write_name_tests.cpp.o
[177/454] Test Bitcoin utilities...
[178/454] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/p2p_messaging_tests.cpp.o
[179/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/walletdb_tests.cpp.o
[180/454] Building CXX object src/seeder/test/CMakeFiles/test-seeder.dir/message_writer_tests.cpp.o
[181/454] Linking CXX executable src/seeder/test/test-seeder
[182/454] seeder: testing write_name_tests
[183/454] Running utility command for check-seeder-write_name_tests
[184/454] seeder: testing options_tests
[185/454] Running utility command for check-seeder-options_tests
[186/454] seeder: testing message_writer_tests
[187/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/coinselector_tests.cpp.o
[188/454] Running utility command for check-seeder-message_writer_tests
[189/454] seeder: testing p2p_messaging_tests
[190/454] seeder: testing parse_name_tests
[191/454] Running utility command for check-seeder-p2p_messaging_tests
[192/454] Running utility command for check-seeder-parse_name_tests
[193/454] Running seeder test suite
PASSED: seeder test suite
[194/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/util.cpp.o
[195/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/bitcoinaddressvalidatortests.cpp.o
[196/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/compattests.cpp.o
[197/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/util_tests.cpp.o
[198/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/guiutiltests.cpp.o
[199/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_bitcoin-qt_autogen/mocs_compilation.cpp.o
[200/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/__/wallet/test/wallet_tests.cpp.o
[201/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/uritests.cpp.o
[202/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/apptests.cpp.o
[203/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/test_main.cpp.o
[204/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/rpcnestedtests.cpp.o
[205/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/__/__/wallet/test/wallet_test_fixture.cpp.o
[206/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.o
[207/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.o
[208/454] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[209/454] Linking CXX executable src/qt/test/test_bitcoin-qt
[210/454] bitcoin-qt: testing test_bitcoin-qt
[211/454] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[212/454] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1
PiRK planned changes to this revision.Feb 4 2022, 14:52
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/test/cuckoocache_tests.cpp
4

Revert

This revision is now accepted and ready to land.Feb 4 2022, 15:22

revert deleting blank line in cuckoocache_tests

This revision was automatically updated to reflect the committed changes.