Add thread safety annotated wrapper for std::mutex

Co-authored-by: Anthony Towns <aj@erisian.com.au>
This commit is contained in:
Hennadii Stepanov
2020-05-28 09:32:21 +03:00
parent 55b4c65bd1
commit 79be487420
2 changed files with 9 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ namespace BCLog {
class Logger
{
private:
mutable std::mutex m_cs; // Can not use Mutex from sync.h because in debug mode it would cause a deadlock when a potential deadlock was detected
mutable StdMutex m_cs; // Can not use Mutex from sync.h because in debug mode it would cause a deadlock when a potential deadlock was detected
FILE* m_fileout GUARDED_BY(m_cs) = nullptr;
std::list<std::string> m_msgs_before_open GUARDED_BY(m_cs);