[PATCH 3 of 6] amend: fix unlocking order - first lock then wlock

Kevin Bullock kbullock+mercurial at ringworld.org
Wed Apr 17 21:57:50 CDT 2013


On 17 Apr 2013, at 2:33 PM, Matt Mackall wrote:

> Derp. The wiki is backwards. This is the locking order:
> 
> try:
> wlock =
> lock =
> tr =
> finally:
> release(tr, lock, wlock)
> 
> The most important rule is wlock-taken-before-lock. I'll fix the wiki.

Yeah, I figured the wiki's release order was probably wrong -- it was releasing in the same order as acquisition, instead of reverse order.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list