summaryrefslogtreecommitdiff
path: root/libs/pbd/event_loop.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-04-03 00:42:39 +0000
committerCarl Hetherington <carl@carlh.net>2010-04-03 00:42:39 +0000
commit8a8552c4cb7c6ea6aa30675ab4fa39bae86a18cf (patch)
tree76fe2c691b6bd24baee0e6ac9d2c809bbb9ee19e /libs/pbd/event_loop.cc
parentf14a33e492ee45599fcb20087bdd32a1698a6803 (diff)
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
Diffstat (limited to 'libs/pbd/event_loop.cc')
-rw-r--r--libs/pbd/event_loop.cc24
1 files changed, 9 insertions, 15 deletions
diff --git a/libs/pbd/event_loop.cc b/libs/pbd/event_loop.cc
index e95a938d63..58ab891c4b 100644
--- a/libs/pbd/event_loop.cc
+++ b/libs/pbd/event_loop.cc
@@ -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;