curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <>
Subject Re: InterProcessMutex acquire
Date Wed, 20 Nov 2013 19:24:30 GMT
I agree that's misleading. Please open a Jira to fix the doc.

In any event, InterProcessMutex works just like a JVM lock except it spans JVMs. It's re-entrant
for the thread that owns the lock. All other threads, JVMs, etc. will block until it's released.


On Nov 20, 2013, at 7:56 AM, wrote:

> Hello,
> So with the InterProcessMutex#acquire method[1], I was a little confused with what the
acquire method would actually do in case another thread already owns the lock. The documentation
seems a little conflicting. At one place it says "Acquire the mutex - blocks until it's available"
while at another it says "java.lang.Exception - ZK errors, interruptions, another thread owns
the lock".
> In my tests, I am seeing the blocking behavior but curious in what cases an exception
would get thrown?
> If someone could clarify this for me, that will be awesome.
> [1],
> -- 
> Swarnim

View raw message