diff options
author | David Robillard <d@drobilla.net> | 2016-10-14 21:47:07 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-10-14 21:47:07 -0400 |
commit | c7c64abd524911ee8bf3e2be9d8aec38b1b4d18a (patch) | |
tree | 29891519954fdfe681bb11d3a566c89fcd52f31c /src/server | |
parent | 4b04a51fc7a7dbd1ea62f81691d4ef923278fb1d (diff) | |
download | ingen-c7c64abd524911ee8bf3e2be9d8aec38b1b4d18a.tar.gz ingen-c7c64abd524911ee8bf3e2be9d8aec38b1b4d18a.tar.bz2 ingen-c7c64abd524911ee8bf3e2be9d8aec38b1b4d18a.zip |
Fix potential store deadlock
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/events/Connect.cpp | 2 | ||||
-rw-r--r-- | src/server/events/Copy.cpp | 2 | ||||
-rw-r--r-- | src/server/events/Delete.cpp | 2 | ||||
-rw-r--r-- | src/server/events/Delta.cpp | 2 | ||||
-rw-r--r-- | src/server/events/Delta.hpp | 2 | ||||
-rw-r--r-- | src/server/events/Disconnect.cpp | 2 | ||||
-rw-r--r-- | src/server/events/DisconnectAll.cpp | 2 | ||||
-rw-r--r-- | src/server/events/Get.cpp | 2 | ||||
-rw-r--r-- | src/server/events/Move.cpp | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp index 35084ea6..34dc569e 100644 --- a/src/server/events/Connect.cpp +++ b/src/server/events/Connect.cpp @@ -52,7 +52,7 @@ Connect::Connect(Engine& engine, bool Connect::pre_process(PreProcessContext& ctx) { - std::lock_guard<std::mutex> lock(_engine.store()->mutex()); + std::lock_guard<Store::Mutex> lock(_engine.store()->mutex()); Node* tail = _engine.store()->get(_tail_path); if (!tail) { diff --git a/src/server/events/Copy.cpp b/src/server/events/Copy.cpp index 30ffb43d..4356e312 100644 --- a/src/server/events/Copy.cpp +++ b/src/server/events/Copy.cpp @@ -51,7 +51,7 @@ Copy::Copy(Engine& engine, bool Copy::pre_process(PreProcessContext& ctx) { - std::lock_guard<std::mutex> lock(_engine.store()->mutex()); + std::lock_guard<Store::Mutex> lock(_engine.store()->mutex()); if (Node::uri_is_path(_old_uri)) { // Old URI is a path within the engine diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp index bab2594a..d04f176c 100644 --- a/src/server/events/Delete.cpp +++ b/src/server/events/Delete.cpp @@ -86,7 +86,7 @@ Delete::pre_process(PreProcessContext& ctx) } // Take a writer lock while we modify the store - std::lock_guard<std::mutex> lock(_engine.store()->mutex()); + std::lock_guard<Store::Mutex> lock(_engine.store()->mutex()); _engine.store()->remove(iter, _removed_objects); diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index ad4f78a1..66897c66 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -175,7 +175,7 @@ Delta::pre_process(PreProcessContext& ctx) } // Take a writer lock while we modify the store - std::unique_lock<std::mutex> lock(_engine.store()->mutex()); + std::unique_lock<Store::Mutex> lock(_engine.store()->mutex()); _object = is_graph_object ? static_cast<Ingen::Resource*>(_engine.store()->get(Node::uri_to_path(_subject))) diff --git a/src/server/events/Delta.hpp b/src/server/events/Delta.hpp index 9e6cbecd..98570210 100644 --- a/src/server/events/Delta.hpp +++ b/src/server/events/Delta.hpp @@ -115,7 +115,7 @@ private: boost::optional<Resource> _preset; - std::unique_lock<std::mutex> _poly_lock; ///< Long-term lock for poly changes + std::unique_lock<Store::Mutex> _poly_lock; ///< Long-term lock for poly changes }; } // namespace Events diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index 476a0cee..40b85c22 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -116,7 +116,7 @@ Disconnect::Impl::Impl(Engine& e, bool Disconnect::pre_process(PreProcessContext& ctx) { - std::lock_guard<std::mutex> lock(_engine.store()->mutex()); + std::lock_guard<Store::Mutex> lock(_engine.store()->mutex()); if (_tail_path.parent().parent() != _head_path.parent().parent() && _tail_path.parent() != _head_path.parent().parent() diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index 2dea6a76..8ce14e74 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -84,7 +84,7 @@ DisconnectAll::~DisconnectAll() bool DisconnectAll::pre_process(PreProcessContext& ctx) { - std::unique_lock<std::mutex> lock(_engine.store()->mutex(), std::defer_lock); + std::unique_lock<Store::Mutex> lock(_engine.store()->mutex(), std::defer_lock); if (!_deleting) { lock.lock(); diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index dfa16ef5..618b8c80 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -48,7 +48,7 @@ Get::Get(Engine& engine, bool Get::pre_process(PreProcessContext& ctx) { - std::lock_guard<std::mutex> lock(_engine.store()->mutex()); + std::lock_guard<Store::Mutex> lock(_engine.store()->mutex()); if (_uri == "ingen:/plugins") { _plugins = _engine.block_factory()->plugins(); diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp index aee74ab6..1563de13 100644 --- a/src/server/events/Move.cpp +++ b/src/server/events/Move.cpp @@ -48,7 +48,7 @@ Move::~Move() bool Move::pre_process(PreProcessContext& ctx) { - std::lock_guard<std::mutex> lock(_engine.store()->mutex()); + std::lock_guard<Store::Mutex> lock(_engine.store()->mutex()); if (!_old_path.parent().is_parent_of(_new_path)) { return Event::pre_process_done(Status::PARENT_DIFFERS, _new_path); |