curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Peterson <quu...@gmail.com>
Subject Re: InterProcessMutex doesn't detect deletion of lock file
Date Tue, 20 Jan 2015 16:39:17 GMT
> It does not. It doesn’t because it’s extra overhead that isn’t needed.
Watchers are not free. That said, if you want to be able to revoke a lock
from another process, InterProcessMutex has the makeRevocable() method and
the RevocationListener.

My issue is not related to revocation.  My issue is that the
InterProcessMutex as implemented is not safe for the scenario I outlined.
Some people may prefer safety over slighly better performance, so I would
argue that there needs to be an option on InterProcessMutex that sets a
watch on the lock file.

-Michael


On Tue, Jan 20, 2015 at 11:22 AM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:

>
> Does the InterProcessMutex set a watch on the lock file it creates?  If
> not, why not?
>
> It does not. It doesn’t because it’s extra overhead that isn’t needed.
> Watchers are not free. That said, if you want to be able to revoke a lock
> from another process, InterProcessMutex has the makeRevocable() method and
> the RevocationListener.
>
>
> -Jordan
>

Mime
View raw message