HomePhabricator

refactor: Replace RecursiveMutex with Mutex in timedata.cpp

Description

refactor: Replace RecursiveMutex with Mutex in timedata.cpp

Summary:

Only GetTimeOffset() and AddTimeData() functions lock this mutex. They do not call itself recursively, and do not call each other either directly or indirectly. Therefore, the g_timeoffset_mutex could be a non-recursive mutex.

This is a backport of core#19189

Test Plan:

CC=clang CXX=clang++ cmake .. -DENABLE_SANITIZERS=thread -GNinja
ninja all check check-functional

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Jun 6 2020, 13:41
PiRKCommitted on Mar 10 2021, 13:16
PiRKPushed on Mar 10 2021, 13:16
Reviewer
Restricted Project
Differential Revision
D9310: refactor: Replace RecursiveMutex with Mutex in timedata.cpp
Parents
rABCe3887570c68e: [Cashtab] Add theming to better organize color changes
Branches
Unknown
Tags
Unknown