mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Allow cross-thread request invalidators to cope with multiple requests
being logged before they are handled, and to invalidate them all rather than just the last one. Fixes shutdown problems when the PortMatrix has been opened during the session, during which PortRegisteredOrUnregistered is emitted quite heavily. git-svn-id: svn://localhost/ardour2/branches/3.0@6852 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f14a33e492
commit
8a8552c4cb
3 changed files with 17 additions and 23 deletions
|
|
@ -29,21 +29,15 @@ EventLoop::invalidate_request (void* data)
|
|||
InvalidationRecord* ir = (InvalidationRecord*) data;
|
||||
|
||||
if (ir->event_loop) {
|
||||
Glib::Mutex::Lock lm (ir->event_loop->slot_invalidation_mutex());
|
||||
if (ir->request) {
|
||||
cerr << "Object deleted had outstanding event loop request, IR created @ "
|
||||
<< ir->file << ':' << ir->line
|
||||
<< endl;
|
||||
ir->request->valid = false;
|
||||
ir->request->invalidation = 0;
|
||||
} else {
|
||||
cerr << "No queued request associated with object deletion from "
|
||||
<< ir->file << ':' << ir->line
|
||||
<< endl;
|
||||
|
||||
}
|
||||
|
||||
delete ir;
|
||||
Glib::Mutex::Lock lm (ir->event_loop->slot_invalidation_mutex());
|
||||
for (list<BaseRequestObject*>::iterator i = ir->requests.begin(); i != ir->requests.end(); ++i) {
|
||||
cerr << "Object deleted had outstanding event loop request, IR created @ "
|
||||
<< ir->file << ':' << ir->line
|
||||
<< endl;
|
||||
(*i)->valid = false;
|
||||
(*i)->invalidation = 0;
|
||||
}
|
||||
delete ir;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue