Resolving the last of the selftest thread hangs
Martin Pool
mbp at canonical.com
Thu Oct 7 08:26:21 BST 2010
I think it would be a good incremental improvement to use a hook here
rather than monkeypatching, and the hook might be useful in other
cases too.
I don't understand how this makes things slower? Is it because the
transports never get gc'd, therefore hang around clogging up memory?
I'm a little surprised the effect is so extreme.
More broadly than just tests, this seems to indicate that when we get
a transport, we should perhaps do so within the context of a larger
scope or context, and then it can be shut down by that. That might be
as simple as an ObjectWithCleanups; it goes towards the Context object
pattern Robert wanted to introduce. There's more than just tests that
want to control the way transports are reused or disposed...
--
Martin
More information about the bazaar
mailing list