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.hpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/server/PreProcessor.hpp b/src/server/PreProcessor.hpp
index 10563ee9..d8e71428 100644
--- a/src/server/PreProcessor.hpp
+++ b/src/server/PreProcessor.hpp
@@ -18,11 +18,10 @@
#define INGEN_ENGINE_PREPROCESSOR_HPP
#include <atomic>
-
-#include <glibmm/thread.h>
+#include <thread>
+#include <mutex>
#include "raul/Semaphore.hpp"
-#include "raul/Thread.hpp"
namespace Ingen {
namespace Server {
@@ -31,18 +30,13 @@ class Event;
class PostProcessor;
class ProcessContext;
-class PreProcessor : public Raul::Thread
+class PreProcessor
{
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.load(); }
@@ -59,14 +53,16 @@ public:
bool limit = true);
protected:
- virtual void _run();
+ void run();
private:
- Glib::Mutex _mutex;
+ std::mutex _mutex;
Raul::Semaphore _sem;
std::atomic<Event*> _head;
std::atomic<Event*> _prepared_back;
std::atomic<Event*> _tail;
+ bool _exit_flag;
+ std::thread _thread;
};
} // namespace Server