ios stuff
This commit is contained in:
1 parent
013b1dc344
commit
da5bd119ab
4 files changed
+16
-13
No files matched your search
@@ -32,23 +32,22 @@ namespace SE
|
||||
[&] ()
|
||||
{
|
||||
result = f();
|
||||
|
||||
|
||||
{
|
||||
boost::mutex::scoped_lock lock(FunctionMutex);
|
||||
boost::mutex::scoped_lock lock(ST::FunctionMutex);
|
||||
functionCalled = true;
|
||||
}
|
||||
FunctionFinishedCondition.notify_one();
|
||||
ST::FunctionFinishedCondition.notify_one();
|
||||
};
|
||||
|
||||
|
||||
|
||||
ST::MainThreadIoService.post(func);
|
||||
|
||||
boost::mutex::scoped_lock lock(FunctionMutex);
|
||||
boost::mutex::scoped_lock lock(ST::FunctionMutex);
|
||||
|
||||
while (!functionCalled)
|
||||
{
|
||||
FunctionFinishedCondition.wait(lock);
|
||||
ST::FunctionFinishedCondition.wait(lock);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user