diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-07-10 02:18:42 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-07-10 02:18:42 +0200 |
commit | b8aa377d883c316f544274dd24db9f079fb8f02a (patch) | |
tree | 63e2dba3b840d4083009dea56f5ae71ee52c7bea /src/Core | |
parent | f892ec46086eee9c4bfb954469016829fb201532 (diff) | |
download | mad-b8aa377d883c316f544274dd24db9f079fb8f02a.tar mad-b8aa377d883c316f544274dd24db9f079fb8f02a.zip |
NetworkUserBackend: Detach() aufrufen
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)); |