summaryrefslogtreecommitdiffstats
path: root/src/server/PreProcessor.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/PreProcessor.hpp')
-rw-r--r--src/server/PreProcessor.hpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/server/PreProcessor.hpp b/src/server/PreProcessor.hpp
index fd886139..9b7fbd44 100644
--- a/src/server/PreProcessor.hpp
+++ b/src/server/PreProcessor.hpp
@@ -20,7 +20,8 @@
#include <glibmm/thread.h>
#include "raul/AtomicPtr.hpp"
-#include "raul/Slave.hpp"
+#include "raul/Semaphore.hpp"
+#include "raul/Thread.hpp"
namespace Ingen {
namespace Server {
@@ -29,13 +30,18 @@ class Event;
class PostProcessor;
class ProcessContext;
-class PreProcessor : public Raul::Slave
+class PreProcessor : public Raul::Thread
{
public:
explicit PreProcessor();
~PreProcessor();
+ virtual void join() {
+ _exit_flag = true;
+ _sem.post();
+ }
+
/** Return true iff no events are enqueued. */
inline bool empty() const { return !_head.get(); }
@@ -52,10 +58,11 @@ public:
bool limit = true);
protected:
- virtual void _whipped(); ///< Prepare 1 event
+ virtual void _run();
private:
Glib::Mutex _mutex;
+ Raul::Semaphore _sem;
Raul::AtomicPtr<Event> _head;
Raul::AtomicPtr<Event> _prepared_back;
Raul::AtomicPtr<Event> _tail;