summaryrefslogtreecommitdiffstats
path: root/src/server/events/Disconnect.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-24 04:52:23 +0000
committerDavid Robillard <d@drobilla.net>2011-09-24 04:52:23 +0000
commit9085d33b7600fd2721f0a2401a4e69830c457f84 (patch)
tree17631e4c88c8fd9d61045e23e84de5f19c005b7b /src/server/events/Disconnect.cpp
parent0e310888809be1b55e6c24081f41f56bebf00f58 (diff)
downloadingen-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/Disconnect.cpp')
-rw-r--r--src/server/events/Disconnect.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index e7177fab..de078c3f 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -15,10 +15,12 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "raul/log.hpp"
+#include <glibmm/thread.h>
+
#include "raul/Maid.hpp"
#include "raul/Path.hpp"
-#include "events/Disconnect.hpp"
+#include "raul/log.hpp"
+
#include "AudioBuffer.hpp"
#include "ClientBroadcaster.hpp"
#include "ConnectionImpl.hpp"
@@ -32,6 +34,7 @@
#include "ProcessContext.hpp"
#include "Request.hpp"
#include "ThreadManager.hpp"
+#include "events/Disconnect.hpp"
using namespace std;
using namespace Raul;
@@ -40,12 +43,11 @@ namespace Ingen {
namespace Server {
namespace Events {
-Disconnect::Disconnect(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::Path& src_port_path,
- const Raul::Path& dst_port_path)
+Disconnect::Disconnect(Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const Raul::Path& src_port_path,
+ const Raul::Path& dst_port_path)
: QueuedEvent(engine, request, timestamp)
, _src_port_path(src_port_path)
, _dst_port_path(dst_port_path)
@@ -113,6 +115,8 @@ Disconnect::Impl::Impl(Engine& e,
void
Disconnect::pre_process()
{
+ Glib::RWLock::WriterLock lock(_engine.engine_store()->lock());
+
if (_src_port_path.parent().parent() != _dst_port_path.parent().parent()
&& _src_port_path.parent() != _dst_port_path.parent().parent()
&& _src_port_path.parent().parent() != _dst_port_path.parent()) {