mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-01 11:27:45 +01:00
Fix session-event queue (multiple writer, single reader)
The reading is done in rt-process thread, but multiple UIs (surfaces, GUI) can produce events to be queued.
This commit is contained in:
parent
c4578db595
commit
cd30a29691
2 changed files with 3 additions and 0 deletions
|
|
@ -167,6 +167,8 @@ protected:
|
|||
Events immediate_events;
|
||||
Events::iterator next_event;
|
||||
|
||||
Glib::Threads::Mutex rb_write_lock;
|
||||
|
||||
/* there can only ever be one of each of these */
|
||||
|
||||
SessionEvent *auto_loop_event;
|
||||
|
|
|
|||
|
|
@ -1033,6 +1033,7 @@ Session::queue_event (SessionEvent* ev)
|
|||
} else if (_state_of_the_state & Loading) {
|
||||
merge_event (ev);
|
||||
} else {
|
||||
Glib::Threads::Mutex::Lock lm (rb_write_lock);
|
||||
pending_events.write (&ev, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue