Fix #679: fix occasional exceptions at shutdown when collecting dispatcher objects
Merge pull request #681 from pitrou/fix679

Fix #679: fix occasional exceptions at shutdown when collecting dispatch...