diff options
author | Robin Gareus <robin@gareus.org> | 2016-12-13 23:46:55 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-12-13 23:47:07 +0100 |
commit | fa07233a17036bc1cab69d5854b5c768ff762f5b (patch) | |
tree | 4048a4a6ca22845a9c80b0ecaf94a453b08b88da /libs/pbd/pbd/abstract_ui.h | |
parent | 176625d9e0dbe53c9f5628d172ee6f5488be8202 (diff) |
mutex 'er up
Some overzealous locking to track down RequestObject related crashes.
bc0fa4d689a4 wrongly locked the current event loop's
request_invalidation_lock instead of the invalidation's list lock.
Also Abstract UI is able to delete requests concurrently with with
EventLoop invalidation.
e.g. PortManager::PortRegisteredOrUnregistered and GlobalPortMatrixWindow
so the lock needs to be exposed.
If this solves various issues, mutexes should to be consolidated
(request_buffer_map_lock + request_invalidation_lock) and be chosen
such that there is as little contention as possible.
Diffstat (limited to 'libs/pbd/pbd/abstract_ui.h')
-rw-r--r-- | libs/pbd/pbd/abstract_ui.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/pbd/pbd/abstract_ui.h b/libs/pbd/pbd/abstract_ui.h index 278f8a2603..e23f443c25 100644 --- a/libs/pbd/pbd/abstract_ui.h +++ b/libs/pbd/pbd/abstract_ui.h @@ -60,7 +60,8 @@ class ABSTRACT_UI_API AbstractUI : public BaseUI void register_thread (pthread_t, std::string, uint32_t num_requests); void call_slot (EventLoop::InvalidationRecord*, const boost::function<void()>&); - Glib::Threads::Mutex& slot_invalidation_mutex() { return request_buffer_map_lock; } + Glib::Threads::Mutex& slot_invalidation_mutex() { return request_buffer_map_lock; } + Glib::Threads::Mutex& request_invalidation_mutex() { return request_invalidation_lock; } Glib::Threads::Mutex request_buffer_map_lock; Glib::Threads::Mutex request_invalidation_lock; |