diff options
Diffstat (limited to 'src/syncQueue.cpp')
-rw-r--r-- | src/syncQueue.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/syncQueue.cpp b/src/syncQueue.cpp index 9e9cef5..338637c 100644 --- a/src/syncQueue.cpp +++ b/src/syncQueue.cpp @@ -43,20 +43,12 @@ #include "syncQueue.h" -SyncQueue* SyncQueue::inst = NULL; -Mutex SyncQueue::instMutex; SyncQueue& gSyncQueue = SyncQueue::instance(); - SyncQueue& SyncQueue::instance() { - Lock lock(instMutex); - static instanceCleaner c; - if(!inst) { - inst = new SyncQueue(); - } - - return *inst; + static SyncQueue instance; + return instance; } void SyncQueue::push(const SyncCommand& scom) @@ -73,7 +65,7 @@ void SyncQueue::push(const SyncCommand& scom) void SyncQueue::push(const std::string& str) { Lock lock(mutex_); - // std::cout << "Debug" << std:endl; + // std::cout << "Debug" << std:endl; if(syncServer_) { syncServer_->send(str); } |