summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-01-22 04:07:53 +0000
committerDavid Robillard <d@drobilla.net>2007-01-22 04:07:53 +0000
commit6fc1fa0d3bec4b82cb3af4c4e887241087899e7e (patch)
tree642326c791c1cac6390b8cc10f6b5fac52e0f36e /src/libs/client
parent6a03dfaf79aa0713df17b03880aaedb3fa8984eb (diff)
downloadingen-6fc1fa0d3bec4b82cb3af4c4e887241087899e7e.tar.gz
ingen-6fc1fa0d3bec4b82cb3af4c4e887241087899e7e.tar.bz2
ingen-6fc1fa0d3bec4b82cb3af4c4e887241087899e7e.zip
Added atomic int/pointer classes to Raul.
Added multi-writer queue to Raul. Renamed Queue SRSWQueue (single-reader single-writer). Updated patchage/ingen for Raul changes. git-svn-id: http://svn.drobilla.net/lad/ingen@264 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/ThreadedSigClientInterface.cpp5
-rw-r--r--src/libs/client/ThreadedSigClientInterface.h6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/libs/client/ThreadedSigClientInterface.cpp b/src/libs/client/ThreadedSigClientInterface.cpp
index bbe336a6..152f94a6 100644
--- a/src/libs/client/ThreadedSigClientInterface.cpp
+++ b/src/libs/client/ThreadedSigClientInterface.cpp
@@ -61,9 +61,10 @@ ThreadedSigClientInterface::emit_signals()
// thread indefinitely while processing continually arriving events
const size_t limit = _sigs.capacity();
size_t num_processed = 0;
- while (!_sigs.is_empty() && num_processed++ < limit) {
+ while (!_sigs.empty() && num_processed++ < limit) {
//printf("emit %zu\n", _sigs.fill());
- Closure& ev = _sigs.pop();
+ Closure& ev = _sigs.front();
+ _sigs.pop();
ev();
ev.disconnect();
}
diff --git a/src/libs/client/ThreadedSigClientInterface.h b/src/libs/client/ThreadedSigClientInterface.h
index e286fc95..0a2b8652 100644
--- a/src/libs/client/ThreadedSigClientInterface.h
+++ b/src/libs/client/ThreadedSigClientInterface.h
@@ -22,7 +22,7 @@
#include <sigc++/sigc++.h>
#include "interface/ClientInterface.h"
#include "SigClientInterface.h"
-#include "raul/Queue.h"
+#include "raul/SRSWQueue.h"
#include "raul/Atom.h"
using std::string;
@@ -138,8 +138,8 @@ private:
bool _enabled;
- Queue<Closure> _sigs;
- uint32_t _num_plugins;
+ SRSWQueue<Closure> _sigs;
+ uint32_t _num_plugins;
sigc::slot<void> bundle_begin_slot;
sigc::slot<void> bundle_end_slot;