HomePhabricator

refactor: Use explicit function type instead of template

Description

refactor: Use explicit function type instead of template

Summary:
PR description:

This PR replaces LockAssertion with AssertLockHeld, and removes LockAssertion.

This PR is compared with alternatives in https://github.com/bitcoin-core/bitcoin-devwiki/wiki/AssertLockHeld-PRs

This is a backport of core#19979 [1/3]
https://github.com/bitcoin/bitcoin/pull/19979/commits/73f71e19965e07534eb47701f2b23c9ed59ef475

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10171

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Sep 19 2020, 08:52
PiRKCommitted on Sep 22 2021, 08:05
PiRKPushed on Sep 22 2021, 08:05
Reviewer
Restricted Project
Differential Revision
D10171: refactor: Use explicit function type instead of template
Parents
rABCac7014aca8fb: doc: Add best practice for annotating/asserting locks
Branches
Unknown
Tags
Unknown