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
  1. Bushstar commented at 2:07 PM on August 24, 2019: contributor

    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.

  2. fanquake added the label Refactoring on Aug 24, 2019
  3. Replace boost::mutex/condition_variable with std equivalents 009f0344ef
  4. Bushstar force-pushed on Aug 24, 2019
  5. 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.

  6. Bushstar commented at 4:27 PM on August 24, 2019: contributor

    Tests failed due to timeouts, please give them a little nudge.

  7. 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.

  8. Bushstar closed this on Aug 25, 2019

  9. Bushstar commented at 5:58 AM on August 25, 2019: contributor

    @promag there is a difference as the timeouts are from the checkqueue_tests.cpp test. I'll run test locally and reopen if I can find a solution.

  10. 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.

  11. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me