summaryrefslogtreecommitdiff
path: root/src/syncQueue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/syncQueue.cpp')
-rw-r--r--src/syncQueue.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/syncQueue.cpp b/src/syncQueue.cpp
index d90caaf..636107b 100644
--- a/src/syncQueue.cpp
+++ b/src/syncQueue.cpp
@@ -42,6 +42,21 @@
#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;
+}
+
void SyncQueue::push(const SyncCommand & scom )
{
std::ostringstream sout;