[ 
https://issues.apache.org/jira/browse/CURATOR-401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15973006#comment-15973006
 ] 

ASF GitHub Bot commented on CURATOR-401:
----------------------------------------

GitHub user srdo opened a pull request:

    https://github.com/apache/curator/pull/214

    CURATOR-401: Make InterProcessMutex.isOwnedByCurrentThread public

    See https://issues.apache.org/jira/browse/CURATOR-401

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/srdo/curator CURATOR-401

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/curator/pull/214.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #214
    
----
commit 96cb3374f1170afd1b3a5f7ac0fe82d79636a093
Author: Stig Rohde Døssing <[email protected]>
Date:   2017-04-18T16:24:56Z

    CURATOR-401: Make InterProcessMutex.isOwnedByCurrentThread public

----


> Make InterProcessMutex.isOwnedByCurrentThread public
> ----------------------------------------------------
>
>                 Key: CURATOR-401
>                 URL: https://issues.apache.org/jira/browse/CURATOR-401
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Recipes
>    Affects Versions: 2.12.0
>            Reporter: Stig Rohde Døssing
>            Priority: Minor
>
> It is useful in some cases to be able to tell if the current thread holds the 
> lock before calling acquire. I have some components using InterProcessMutex 
> for coordination that are intended to run in different JVMs in production. 
> I'd like to be able to write an integration test that runs them in the same 
> JVM in different threads, and verify that the lock is held by the expected 
> component at certain points in the code.
> Using InterProcessMutex.isAcquiredInThisProcess is not a good replacement in 
> this case, and acquiring/releasing the lock unnecessarily also doesn't seem 
> like a good solution.
> InterProcessMutex already supports this functionality, but the method is 
> package private.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to