In src/nodemanager.cpp, every occurrence of mMutex.owns_lock() gives the following compile error:
In file included from /usr/include/c++/14.1.1/cassert:44,
from /build/megasync/src/MEGAsync/src/MEGASync/mega/include/mega/fuse/common/pending_callbacks.h:3,
from /build/megasync/src/MEGAsync/src/MEGASync/mega/include/mega/fuse/common/client_adapter.h:10,
from /build/megasync/src/MEGAsync/src/MEGASync/mega/include/mega/megaclient.h:47,
from /build/megasync/src/MEGAsync/src/MEGASync/mega/src/nodemanager.cpp:23:
/build/megasync/src/MEGAsync/src/MEGASync/mega/src/nodemanager.cpp: In member function ‘void mega::NodeManager::setTable_internal(mega::DBTableNodes*)’:
/build/megasync/src/MEGAsync/src/MEGASync/mega/src/nodemanager.cpp:46:19: error: ‘using mega::NodeManager::MutexType = class std::recursive_mutex’ {aka ‘class std::recursive_mutex’} has no member named ‘owns_lock’
46 | assert(mMutex.owns_lock());
| ^~~~~~~~~
That's because the mMutex variable is of typestd::recursive_mutex (in non debug builds), which in turn does not have an own_lock() method. A mutex cannot check if it owns the lock for itself, and lock variables like std::unique_lock must to be used for this purpose.
In
src/nodemanager.cpp
, every occurrence ofmMutex.owns_lock()
gives the following compile error:That's because the
mMutex
variable is of typestd::recursive_mutex
(in non debug builds), which in turn does not have anown_lock()
method. A mutex cannot check if it owns the lock for itself, and lock variables likestd::unique_lock
must to be used for this purpose.System Information: