[PATCH] Singleton Branches
Aaron Bentley
aaron.bentley at utoronto.ca
Thu May 26 17:56:26 BST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
| It is very easy in code to have multiple requests for the same branch
| object without realizing it. Because the filesystem is sometimes the
| point of coordination, not the python code. Two portions of code saying
| give me information about this file will probably have to allocate a
| branch object to get it.
|
| I only really need a singleton Lock object, though it seemed reasonable
| to put that in the Branch object.
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?
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFClf+60F+nu1YWqI0RAncGAJ9dpJ8gtlRlmGduorvSb8gU20AJpwCfeVo5
PxEGZhZHljG2h9Ay8I6Bf5s=
=mweD
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list