[RFC/MERGE][#243391] _run_and_cleanup helper (alternative to try/finally)
Martin Pool
mbp at canonical.com
Thu Oct 9 03:17:23 BST 2008
On Thu, Oct 9, 2008 at 12:52 PM, Andrew Bennetts
<andrew.bennetts at canonical.com> wrote:
> I don't think we can hope that genuinely important exceptions can't
> occur during unlock. e.g. what about connection lost *during* an
> unlock?
I think merely giving a warning there is probably reasonable. If the
code continues, it will observe either that the connection is lost or
that there's an orphaned lock on the object. But more commonly, we'll
exit with status 0 but leaving the object unlocked. For lock in
particular I think this is reasonable. (If we went down this course,
we could have the code that gives the overall return code change it
from 0 to something else if any warnings of this kind occurred.)
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list