summaryrefslogtreecommitdiffstats
path: root/src/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-12-20 19:00:33 +0000
committerDavid Robillard <d@drobilla.net>2008-12-20 19:00:33 +0000
commit72c6d069df26396436c653532702a4f96f901fba (patch)
tree2a766dae4b1fc88bd29eaaa5c854ceae71469adf /src/engine/events
parentbdc0651e0b5407d88f821329c9275625956f96d2 (diff)
downloadingen-72c6d069df26396436c653532702a4f96f901fba.tar.gz
ingen-72c6d069df26396436c653532702a4f96f901fba.tar.bz2
ingen-72c6d069df26396436c653532702a4f96f901fba.zip
Fix race condition on clear patch.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1876 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events')
-rw-r--r--src/engine/events/ClearPatchEvent.cpp2
-rw-r--r--src/engine/events/DestroyEvent.cpp4
-rw-r--r--src/engine/events/DestroyEvent.hpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/events/ClearPatchEvent.cpp b/src/engine/events/ClearPatchEvent.cpp
index c180e5fa..7dfdbc3e 100644
--- a/src/engine/events/ClearPatchEvent.cpp
+++ b/src/engine/events/ClearPatchEvent.cpp
@@ -56,6 +56,7 @@ ClearPatchEvent::pre_process()
_removed_table = _engine.engine_store()->remove_children(patch_iterator);
_patch->nodes().clear();
_patch->connections().clear();
+ _patch->clear_ports();
_ports_array = _patch->build_ports_array();
if (_patch->enabled())
_compiled_patch = _patch->compile();
@@ -79,7 +80,6 @@ ClearPatchEvent::execute(ProcessContext& context)
_patch->compiled_patch(NULL);
}
- _patch->clear_ports();
_patch->connections().clear();
_patch->compiled_patch(_compiled_patch);
Raul::Array<PortImpl*>* old_ports = _patch->external_ports();
diff --git a/src/engine/events/DestroyEvent.cpp b/src/engine/events/DestroyEvent.cpp
index 17552938..c1ee15e7 100644
--- a/src/engine/events/DestroyEvent.cpp
+++ b/src/engine/events/DestroyEvent.cpp
@@ -34,8 +34,8 @@
namespace Ingen {
-DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool block)
- : QueuedEvent(engine, responder, time, source, source)
+DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path)
+ : QueuedEvent(engine, responder, time, true, source)
, _path(path)
, _store_iterator(engine.engine_store()->end())
, _driver_port(NULL)
diff --git a/src/engine/events/DestroyEvent.hpp b/src/engine/events/DestroyEvent.hpp
index 1876050d..c260a480 100644
--- a/src/engine/events/DestroyEvent.hpp
+++ b/src/engine/events/DestroyEvent.hpp
@@ -49,7 +49,7 @@ class CompiledPatch;
class DestroyEvent : public QueuedEvent
{
public:
- DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool block = true);
+ DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, const string& path);
~DestroyEvent();
void pre_process();