mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 11:23:26 +01:00
easylogging++: enforce recursive mutex
This fixes a hang when logging something which causes some other logging code to be called
This commit is contained in:
parent
71ac698b78
commit
5161f16f4a
6
external/easylogging++/easylogging++.h
vendored
6
external/easylogging++/easylogging++.h
vendored
@ -1001,7 +1001,11 @@ namespace el {
|
||||
public:
|
||||
Mutex(void) {
|
||||
# if ELPP_OS_UNIX
|
||||
pthread_mutex_init(&m_underlyingMutex, nullptr);
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init(&m_underlyingMutex, &attr);
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
# elif ELPP_OS_WINDOWS
|
||||
InitializeCriticalSection(&m_underlyingMutex);
|
||||
# endif // ELPP_OS_UNIX
|
||||
|
Loading…
Reference in New Issue
Block a user