curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Vines <vi...@apache.org>
Subject Re: InterProcessReadWriteLock
Date Wed, 11 Sep 2013 03:31:16 GMT
Awesome, thanks!


On Tue, Sep 10, 2013 at 6:19 PM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:

> > what happens if I attempt to acquire a write lock while there are read
> lock's in position?
> The writer waits until all readers release.
>
> > If the former, will it still block for the reader who's attempting to
> claim the writer?
> Just like JDK locks, upgrading from a read lock to the write lock is not
> possible. That would be a deadlock as the writer will wait indefinitely for
> the read to release.
>
> -JZ
>
> On Sep 10, 2013, at 5:10 PM, John Vines <vines@apache.org> wrote:
>
> > Quick question about the behavior of the InterProcessReadWriteLock's
> locking behavior- what happens if I attempt to acquire a write lock while
> there are read lock's in position? Will it block until the reader's are
> released or will it attempt to revoke the reader's locks? If the former,
> will it still block for the reader who's attempting to claim the writer?
> >
> > Thanks
> > John
>
>

Mime
View raw message