summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-12-31 22:03:14 +0000
committerDavid Robillard <d@drobilla.net>2013-12-31 22:03:14 +0000
commit250974e44a9cfb3cd33b2d902bc0daaaff1d6a14 (patch)
tree5d73343f01647ea86f3ef6381814a2dccecbd22f /src/server
parent5b282781b24ca58b65c72e3c6be1313d7974c6ed (diff)
downloadingen-250974e44a9cfb3cd33b2d902bc0daaaff1d6a14.tar.gz
ingen-250974e44a9cfb3cd33b2d902bc0daaaff1d6a14.tar.bz2
ingen-250974e44a9cfb3cd33b2d902bc0daaaff1d6a14.zip
Hopefully fix deadlock on exit for real this time.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5244 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server')
-rw-r--r--src/server/Engine.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 1f6fd70c..922935c9 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -100,9 +100,11 @@ Engine::~Engine()
// Process all pending events
const FrameTime end = std::numeric_limits<FrameTime>::max();
_process_context.locate(_process_context.end(), end - _process_context.end());
- _post_processor->set_end_time(end);
- _pre_processor->process(_process_context, *_post_processor, false);
- _post_processor->process();
+ while (!_pre_processor->empty()) {
+ _post_processor->set_end_time(end);
+ _pre_processor->process(_process_context, *_post_processor, false);
+ _post_processor->process();
+ }
const SPtr<Store> store = this->store();
if (store) {
@@ -354,7 +356,9 @@ Engine::pending_events()
void
Engine::enqueue_event(Event* ev)
{
- _pre_processor->event(ev);
+ if (!_quit_flag) {
+ _pre_processor->event(ev);
+ }
}
unsigned