Subj : Re: Improving read-write lock To : comp.programming.threads From : Rob Date : Thu Feb 17 2005 09:37 am Joe Seigh wrote: > On Wed, 16 Feb 2005 18:21:28 +0100, Marcin 'Qrczak' Kowalczyk > wrote: > >> "Joe Seigh" writes: >> >>>> It's not a perfect situation of course, because only one ReadPromotable >>>> lock exists. >>> >>> >>> More than one promotable read lock can exist. It just has to stay >>> blocked >>> until any pior promotable read locks have completed their write access. >> >> >> No, because if two threads holding promotable read locks try to >> promote them, they will deadlock. > > > I didn't say that two threads could hold a promotable read lock at the same > time. But there can be more than one outstanding request for a promotable > read lock at the same time. They just stay blocked until prior write > accesses > have completed. I think we mean the same thing, but just have a different idea about when a lock exists. .