[PATCH] Singleton Branches
Aaron Bentley
aaron.bentley at utoronto.ca
Thu May 26 18:16:50 BST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
| Aaron Bentley wrote:
|>If you put it in the Branch object, then when the lock is write-locked,
|>attempts to acquire the Branch must raise an exception. And when it's
|>read-locked, attempts to unlock the branch must raise an exception if
|>the Branch is referenced in more than one place.
|>
|>Is that really the kind of thing you want?
|
|
| I think it was necessary when branches automatically locked themselves.
| However, with explicit locking of branches, no, I don't think it is the
| right thing anymore.
Okay, unlocking in multiple places is okay, as long as the singleton
doesn't actually unlock until the refcount hits 0.
But I don't think it should be possible to use a branch at all when it's
write-locked. So I think the first part "attempts to acquire the Branch
must raise an exception" holds true there, and worse: you can't
write-lock the Branch if someone else *already* has acquired it, even if
they haven't locked it.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFClgSC0F+nu1YWqI0RArTDAJ46c0QHBWpGCAwVAVeyUP5uwB+IagCffBsm
J9P5T1RSeEliDeAxV5rSN4Q=
=JGC8
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list