From b8aa377d883c316f544274dd24db9f079fb8f02a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 10 Jul 2009 02:18:42 +0200 Subject: NetworkUserBackend: Detach() aufrufen --- src/Core/ThreadManager.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/Core') 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 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)); -- cgit v1.2.3