refactor: Replace RecursiveMutex with Mutex in Shutdown() #19180

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:200605-shutdown changing 1 files +5 −6
  1. hebasto commented at 7:10 PM on June 5, 2020: member

    Step by step, going to replace all of the RecursiveMutex instances with the Mutex ones throughout the code base :)

    Not sure if it is possible in all cases though...

    This one is a low-hanging fruit.

  2. refactor: Replace RecursiveMutex with Mutex in Shutdown() 1a9ef1d398
  3. fanquake added the label Refactoring on Jun 5, 2020
  4. hebasto marked this as ready for review on Jun 5, 2020
  5. MarcoFalke commented at 8:09 PM on June 5, 2020: member

    ACK 1a9ef1d398dd14728b6bc67a89139cdf827c9753 Shutdown is not recursive, so the same thread can never lock twice (UB)

  6. DrahtBot commented at 1:02 AM on June 6, 2020: contributor

    <!--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:

    • #19192 (doc: Extract net permissions doc by MarcoFalke)
    • #19064 (refactor: Cleanup thread ctor calls by hebasto)
    • #18077 (net: Add NAT-PMP port forwarding support by hebasto)

    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.

  7. DrahtBot cross-referenced this on Jun 6, 2020 from issue refactor: Cleanup thread ctor calls by hebasto
  8. DrahtBot cross-referenced this on Jun 6, 2020 from issue net: Add NAT-PMP port forwarding support by hebasto
  9. hebasto cross-referenced this on Jun 6, 2020 from issue refactor: Replace RecursiveMutex with Mutex in timedata.cpp by hebasto
  10. hebasto cross-referenced this on Jun 6, 2020 from issue refactor: Replace RecursiveMutex with Mutex in netbase.cpp by hebasto
  11. DrahtBot cross-referenced this on Jun 7, 2020 from issue doc: Extract net permissions doc by MarcoFalke
  12. vasild commented at 7:57 AM on June 8, 2020: contributor

    ACK 1a9ef1d3 verified manually that Shutdown() is not called from places that could be called from inside Shutdown().

    Not sure if it is possible in all cases though...

    I think it should be

  13. vasild approved
  14. hebasto commented at 8:38 AM on June 8, 2020: member

    @sipa Mind reviewing this PR?

  15. MarcoFalke merged this on Jun 8, 2020
  16. MarcoFalke closed this on Jun 8, 2020

  17. hebasto deleted the branch on Jun 8, 2020
  18. MarcoFalke referenced this in commit 8496dbeba6 on Jun 8, 2020
  19. MarcoFalke referenced this in commit 374fd6fc8b on Jun 8, 2020
  20. hebasto cross-referenced this on Jun 8, 2020 from issue util: Get rid of RecursiveMutex in Get{Blocks,Data}Dir by hebasto
  21. hebasto cross-referenced this on Jun 9, 2020 from issue refactor: Replace RecursiveMutex with Mutex in warnings.cpp by hebasto
  22. MarcoFalke referenced this in commit 9ad6f14175 on Jun 9, 2020
  23. hebasto cross-referenced this on Jun 10, 2020 from issue refactor: Make CAddrMan::cs non-recursive by hebasto
  24. hebasto cross-referenced this on Jun 17, 2020 from issue Replace all of the RecursiveMutex instances with the Mutex ones by hebasto
  25. Fabcien referenced this in commit c9c716200e on Mar 1, 2021
  26. PastaPastaPasta referenced this in commit 40f173954b on Jun 27, 2021
  27. PastaPastaPasta referenced this in commit 6c258b1f13 on Jun 28, 2021
  28. PastaPastaPasta referenced this in commit b192adca4f on Jun 29, 2021
  29. PastaPastaPasta referenced this in commit 7eb2b2f910 on Sep 17, 2021
  30. PastaPastaPasta referenced this in commit 12b5cfcff0 on Sep 19, 2021
  31. thelazier referenced this in commit d9423ace44 on Sep 25, 2021
  32. hebasto cross-referenced this on Jan 19, 2022 from issue Replace `RecursiveMutex cs_mapLocalHost` with Mutex, and rename it by w0xlt
  33. bitcoin locked this on Feb 15, 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-05-20 06:54 UTC