scripted-diff: Complete the move from CCriticalSection to identical RecursiveMutex (both are AnnotatedMixin<std::recursive_mutex>) #16084

pull practicalswift wants to merge 2 commits into bitcoin:master from practicalswift:recursive-mutex changing 28 files +47 −48
  1. practicalswift commented at 2:25 PM on May 24, 2019: contributor

    Complete the move from CCriticalSection to identical RecursiveMutex (both are AnnotatedMixin<std::recursive_mutex>) using a scripted-diff. Remove CCriticalSection.

    Rationale: RecursiveMutex is more descriptive than CCriticalSection. The use of two different ways to refer to the same lock type might be somewhat confusing for new contributors.

    Context: RecursiveMutex was introduced in #14963 which was merged back in January.

  2. DrahtBot added the label Mempool on May 24, 2019
  3. DrahtBot added the label P2P on May 24, 2019
  4. DrahtBot added the label Refactoring on May 24, 2019
  5. DrahtBot added the label RPC/REST/ZMQ on May 24, 2019
  6. DrahtBot added the label Tests on May 24, 2019
  7. DrahtBot added the label TX fees and policy on May 24, 2019
  8. DrahtBot added the label Utils/log/libs on May 24, 2019
  9. DrahtBot added the label Validation on May 24, 2019
  10. DrahtBot added the label Wallet on May 24, 2019
  11. fanquake removed the label Mempool on May 24, 2019
  12. fanquake removed the label P2P on May 24, 2019
  13. fanquake removed the label RPC/REST/ZMQ on May 24, 2019
  14. fanquake removed the label TX fees and policy on May 24, 2019
  15. fanquake removed the label Tests on May 24, 2019
  16. fanquake removed the label Utils/log/libs on May 24, 2019
  17. fanquake removed the label Validation on May 24, 2019
  18. fanquake removed the label Wallet on May 24, 2019
  19. DrahtBot commented at 5:26 PM on May 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:

    • #15976 (refactor: move methods under CChainState (pt. 1) by jamesob)
    • #15936 (WIP: Unify bitcoin-qt and bitcoind persistent settings by ryanofsky)
    • #15935 (WIP: Add <datadir>/settings.json persistent settings storage by ryanofsky)
    • #15934 (Dedup settings merge code by ryanofsky)
    • #15921 (Tidy up ValidationState interface by jnewbery)
    • #15759 ([p2p] Add 2 outbound blocks-only connections by sdaftuar)
    • #14046 (net: Refactor message parsing (CNetMessage), adds flexibility by jonasschnelli)
    • #14032 (Add p2p layer encryption with ECDH/ChaCha20Poly1305 by jonasschnelli)
    • #10443 (Add fee_est tool for debugging fee estimation code by ryanofsky)
    • #9152 (Wallet/RPC: sweepprivkeys method to scan UTXO set and send to local wallet by luke-jr)

    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.

  20. practicalswift commented at 10:25 AM on May 25, 2019: contributor

    FWIW: I've verified that a disassembly of the bitcoind binary built on a Ubuntu 18.04 machine with this patch applied is identical to a disassembly of the bitcoind binary built against master (as expected).

  21. DrahtBot added the label Needs rebase on May 25, 2019
  22. scripted-diff: Complete the move from CCriticalSection to identical RecursiveMutex (both are AnnotatedMixin<std::recursive_mutex>)
    -BEGIN VERIFY SCRIPT-
    git grep -l "CCriticalSection" ":(exclude)src/sync.h" | xargs sed -i "s/CCriticalSection/RecursiveMutex/g"
    -END VERIFY SCRIPT-
    e1e1146944
  23. Remove CCriticalSection bec38f55b7
  24. practicalswift force-pushed on May 26, 2019
  25. DrahtBot removed the label Needs rebase on May 26, 2019
  26. MarcoFalke commented at 2:19 AM on May 28, 2019: member

    Thank you for your contribution. While this stylistic change makes sense on its own, it comes at a cost and risk for the project as a whole. The weak motivation for the change does not justify the burden that it places on the project. A burden could be any of the following:

    • Time spent on review
    • Accidental introduction of bugs
    • (Silent) merge conflicts, either in the branch or a backport branch. Those conflicts demand further developer and reviewer time or introduce bugs.

    For more information about refactoring changes and stylistic cleanup, see

    Generally, if the style is not mentioned nor enforced by the developer notes, we leave it up to the original author to pick whatever fits them best personally and then leave it that way until the line is touched for other reasons.

    Let me know if you have any questions.

  27. MarcoFalke closed this on May 28, 2019

  28. Empact commented at 2:28 AM on May 28, 2019: member

    Personally I ack irrespective of conflicts but I understand the conflicts being a concern here.

  29. practicalswift deleted the branch on Apr 10, 2021
  30. DrahtBot locked this on Aug 16, 2022

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-16 15:14 UTC

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