[Yum-devel] locking

seth vidal skvidal at fedoraproject.org
Thu Feb 21 15:21:40 UTC 2008


On Thu, 2008-02-21 at 16:17 +0100, Florian Festi wrote:

> If it gets implemented that simple we can get deadlocked quite easily.
> 
> instance 1: lock repo1
> instance 2: lock repo2
> instance 1: lock repo2 -> wait
> instance 2: lock repo1 -> wait -> deadlock


No.
instance 1: lock repo1, do what you have to do, unlock repo1
instance 2: lock repo2, do what you have to do, unlock repo2
instance 1: lock repo2, wait until instance 2 unlocks, continue.

How are we deadlocking there?

You're thinking of the lock being for the entire runtime of the program,
I'm thinking of the lock being for the time during which we are
WRITING/downloading info.

-sv





More information about the Yum-devel mailing list