fix rare livelock in std::map thread_buffer_requests
During initial session load it's possible that two threads call PBD::notify_event_loops_about_thread_creation() simultaneously (in particular the process threads). This can lead to an endless loop in stl_tree.h when assigning thread_buffer_requests[key] Now we only have WriteLocks.. unless some better solution comes up a Mutex will do.
This commit is contained in:
parent
794f4cd360
commit
455f07d087
|
@ -147,7 +147,7 @@ EventLoop::pre_register (const string& emitting_thread_name, uint32_t num_reques
|
|||
*/
|
||||
|
||||
ThreadBufferMapping mapping;
|
||||
Glib::Threads::RWLock::ReaderLock lm (thread_buffer_requests_lock);
|
||||
Glib::Threads::RWLock::WriterLock lm (thread_buffer_requests_lock);
|
||||
|
||||
for (RequestBufferSuppliers::iterator trs = request_buffer_suppliers.begin(); trs != request_buffer_suppliers.end(); ++trs) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user