Thread-safety

This commit is contained in:
vladislav.khorev committed 2013-02-03 21:24:01 +00:00
1 parent 1abaf6c321
commit 916a41e064
17 files changed
+289 -286

No files matched your search

+9 -1
View File
@@ -7,7 +7,15 @@ namespace SE
{
if (boost::this_thread::get_id() != ResourceManager->MainThreadId)
{
throw ErrorToLog("ERROR! AssertIfInMainThread failed!");
throw ErrorToLog("ERROR! AssertIfInMainThread - assert failed!");
}
}
void TryUpdateMainThreadId()
{
if (boost::this_thread::get_id() != ResourceManager->MainThreadId)
{
ResourceManager->MainThreadId = boost::this_thread::get_id();
}
}