This commit is contained in:
vladislav.khorev committed 2013-02-03 13:11:16 +00:00
1 parent a8e01ed69d
commit c9b7f21be5
11 files changed
+228 -13

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#include "include/Engine.h"
namespace SE
{
void AssertIfInMainThread()
{
if (boost::this_thread::get_id() != ResourceManager->MainThreadId)
{
throw ErrorToLog("ERROR! AssertIfInMainThread failed!");
}
}
void PerformInMainThreadAsync(boost::function<void()> f)
{
if (boost::this_thread::get_id() == ResourceManager->MainThreadId)
{
f();
}
else
{
ResourceManager->MainThreadAsyncFunctionArr.push_back(f);
}
}
} //namespace SE