Fix race condition in debug build printing

This commit is contained in:
Lion Kortlepel
2020-11-04 11:58:09 +01:00
parent 2beff2495f
commit 5452aeb558
3 changed files with 69 additions and 54 deletions

View File

@@ -2,8 +2,10 @@
/// Created by Anonymous275 on 4/2/2020.
///
#pragma once
#include <string>
#include <iostream>
#include <mutex>
#include <string>
extern std::mutex MLock;
void InitLog();
#define DebugPrintTID() DebugPrintTIDInternal(__func__)
void DebugPrintTIDInternal(const std::string& func); // prints the current thread id in debug mode, to make tracing of crashes and asserts easier