diff options
author | David Robillard <d@drobilla.net> | 2011-09-24 04:52:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-09-24 04:52:23 +0000 |
commit | 9085d33b7600fd2721f0a2401a4e69830c457f84 (patch) | |
tree | 17631e4c88c8fd9d61045e23e84de5f19c005b7b /src/server/events/CreatePort.cpp | |
parent | 0e310888809be1b55e6c24081f41f56bebf00f58 (diff) | |
download | ingen-9085d33b7600fd2721f0a2401a4e69830c457f84.tar.gz ingen-9085d33b7600fd2721f0a2401a4e69830c457f84.tar.bz2 ingen-9085d33b7600fd2721f0a2401a4e69830c457f84.zip |
Remove concept of "blocking" events in favour of store RWLock.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3488 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events/CreatePort.cpp')
-rw-r--r-- | src/server/events/CreatePort.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index fdf675a6..5c3ecbd2 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -49,7 +49,7 @@ CreatePort::CreatePort( const Raul::URI& type, bool is_output, const Resource::Properties& properties) - : QueuedEvent(engine, request, timestamp, bool(request)) + : QueuedEvent(engine, request, timestamp) , _path(path) , _type(type) , _is_output(is_output) @@ -58,16 +58,7 @@ CreatePort::CreatePort( , _patch_port(NULL) , _driver_port(NULL) , _properties(properties) - , _lock(engine.engine_store()->lock(), Glib::NOT_LOCK) { - /* This is blocking because of the two different sets of Patch ports, the array used in the - * audio thread (inherited from NodeImpl), and the arrays used in the pre processor thread. - * If two add port events arrive in the same cycle and the second pre processes before the - * first executes, bad things happen (ports are lost). - * - * TODO: fix this using RCU? - */ - if (_data_type == PortType::UNKNOWN) _error = UNKNOWN_TYPE; } @@ -75,8 +66,6 @@ CreatePort::CreatePort( void CreatePort::pre_process() { - _lock.acquire(); - if (_error == UNKNOWN_TYPE || _engine.engine_store()->find_object(_path)) { QueuedEvent::pre_process(); return; @@ -156,16 +145,12 @@ CreatePort::execute(ProcessContext& context) if (_driver_port) { _engine.driver()->add_port(_driver_port); } - - if (_request) - _request->unblock(); } void CreatePort::post_process() { if (!_request) { - _lock.release(); return; } @@ -188,8 +173,6 @@ CreatePort::post_process() _request->respond_error(msg); break; } - - _lock.release(); } } // namespace Server |