wallet: Add compile-time checking of (non-)locking assumptions for BlockUntilSyncedToCurrentChain() [wip] #11799

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:BlockUntilSyncedToCurrentChain-compile-time-warnings changing 1 files +1 −1
  1. practicalswift commented at 2:44 PM on November 30, 2017: contributor

    Add compile-time checking of (non-)locking assumptions for BlockUntilSyncedToCurrentChain().

  2. wallet: Add compile-time checking of (non-)locking assumptions for BlockUntilSyncedToCurrentChain() 06f1bb1a8d
  3. practicalswift renamed this:
    wallet: Add compile-time checking of (non-)locking assumptions for BlockUntilSyncedToCurrentChain()
    wallet: Add compile-time checking of (non-)locking assumptions for BlockUntilSyncedToCurrentChain() [wip]
    on Nov 30, 2017
  4. practicalswift commented at 3:09 PM on November 30, 2017: contributor

    Added a WIP-marker: Obviously the annotation should go into wallet.h and not wallet.cpp. The problem is that the existence of cs_main is currently not known in wallet.h. What is the most appropriate way to solve that? I guess we don't want extern CCriticalSection cs_main; in wallet.h? :-)

  5. fanquake added the label Wallet on Nov 30, 2017
  6. TheBlueMatt commented at 8:24 PM on December 4, 2017: member

    Given that the LOCKS_EXCLUDED annotation only captures cases where the lock is taken in the same function as the call to BlockUntilSyncedToCurrentChain, I'm not sure the value of this. Indeed, obviously putting it in wallet.cpp is entirely useless, but it has only really marginal value. I'm open to discussion about whether its worth an extern CCriticalSection cs_main in wallet.h for this.

  7. practicalswift commented at 8:29 PM on December 4, 2017: contributor

    Yes, LOCKS_EXCLUDED is not transitive. Perhaps not worth it. Closing this PR.

  8. practicalswift closed this on Dec 4, 2017

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

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

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