summaryrefslogtreecommitdiffstats
path: root/src/Core
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-07-10 02:18:42 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-07-10 02:18:42 +0200
commitb8aa377d883c316f544274dd24db9f079fb8f02a (patch)
tree63e2dba3b840d4083009dea56f5ae71ee52c7bea /src/Core
parentf892ec46086eee9c4bfb954469016829fb201532 (diff)
downloadmad-b8aa377d883c316f544274dd24db9f079fb8f02a.tar
mad-b8aa377d883c316f544274dd24db9f079fb8f02a.zip
NetworkUserBackend: Detach() aufrufen
Diffstat (limited to 'src/Core')
-rw-r--r--src/Core/ThreadManager.cpp7
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));