diff options
Diffstat (limited to 'src/Core')
-rw-r--r-- | src/Core/ThreadManager.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Core/ThreadManager.cpp b/src/Core/ThreadManager.cpp index ecb6031..773ef23 100644 --- a/src/Core/ThreadManager.cpp +++ b/src/Core/ThreadManager.cpp @@ -57,11 +57,6 @@ void ThreadManager::workerFunc() { } void ThreadManager::detach() { - if(isThisMainThread()) { - application->log(Logger::CRITICAL, "Tried to detach main thread! This is just WRONG!"); - return; - } - { boost::lock_guard<boost::mutex> lock(runLock); if(!running) @@ -70,7 +65,7 @@ void ThreadManager::detach() { threadLock.lock(); - if(workerThread->get_id() == boost::this_thread::get_id()) {// Already detached? + if(workerThread->get_id() == boost::this_thread::get_id()) {// Already detached or no worker thread? threads.insert(std::make_pair(boost::this_thread::get_id(), workerThread)); workerThread.reset(new boost::thread(std::mem_fun(&ThreadManager::workerFunc), this)); |