Code review comment for lp:~spiv/bzr/debug-flag-relock

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Bennetts wrote:
> Andrew Bennetts has proposed merging lp:~spiv/bzr/debug-flag-relock into lp:bzr.
>
> Requested reviews:
> Martin Pool (mbp):
> Vincent Ladeuil (vila)
>
>

So do I understand correctly that this is only triggered when an object
*loses* the lock and then re-acquires it?

So doing:

foo.lock_read()
foo.lock_read()
foo.unlock()
foo.unlock()

would not trigger it, but

foo.lock_read()
foo.unlock()
foo.lock_read()
foo.unlock()

would.

I agree that we should probably have a hook, or some sort of mechanism
for testing this, as it is worthwhile to test. Perhaps you could have a
global state in "lock" like our "symbol_versioning.warn" functionality?

 review: approve

Subject to Martin/Vincent's vote, since they reviewed first.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrMmdwACgkQJdeBCYSNAAPRFwCgrTbQAjq8SDggQnngugjdyEpk
odkAoIaGHnfDPa0nYVkn6zVPgQekcLcS
=UHav
-----END PGP SIGNATURE-----

review: Approve

« Back to merge proposal