mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-06-18 23:20:53 +00:00
print always
This commit is contained in:
+8
-6
@@ -115,12 +115,14 @@ std::string ThreadName(bool DebugModeOverride) {
|
|||||||
|
|
||||||
void RegisterThread(const std::string& str) {
|
void RegisterThread(const std::string& str) {
|
||||||
std::string ThreadId;
|
std::string ThreadId;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
ThreadId = std::to_string(GetCurrentThreadId());
|
ThreadId = std::to_string(GetCurrentThreadId());
|
||||||
#else
|
#else
|
||||||
ThreadId = std::to_string(gettid());
|
ThreadId = std::to_string(gettid());
|
||||||
#endif
|
#endif
|
||||||
beammp_debug("Thread \"" + str + "\" is TID " + ThreadId);
|
if (Application::Settings.DebugModeEnabled) {
|
||||||
|
std::cout << ("Thread \"" + str + "\" is TID " + ThreadId) << std::endl;
|
||||||
|
}
|
||||||
auto Lock = std::unique_lock(ThreadNameMapMutex);
|
auto Lock = std::unique_lock(ThreadNameMapMutex);
|
||||||
threadNameMap[std::this_thread::get_id()] = str;
|
threadNameMap[std::this_thread::get_id()] = str;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user