HomePhabricator

refactor: replace RecursiveMutex m_cs_callbacks_pending with Mutex (and rename)

Description

refactor: replace RecursiveMutex m_cs_callbacks_pending with Mutex (and rename)

Summary:

scripted-diff: rename m_cs_callbacks_pending -> m_callbacks_mutex

refactor: replace RecursiveMutex m_callbacks_mutex with Mutex

In each of the critical sections, only the the guarded variables are
accessed, without any chance that within one section another one is
called. Hence, we can use an ordinary Mutex instead of RecursiveMutex.

This is a backport of core#24069

Test Plan:
with clang and debug
ninja && ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on Nov 3 2023, 09:13
PiRKPushed on Nov 3 2023, 14:40
Reviewer
Restricted Project
Differential Revision
D14731: refactor: replace RecursiveMutex m_cs_callbacks_pending with Mutex (and rename)
Parents
rABC0cb1d1901233: wallet: Avoid locking cs_wallet recursively
Branches
Unknown
Tags
Unknown