You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/09/19 20:24:21 UTC

[jira] [Commented] (CURATOR-350) Allow to close executor service on shutdown

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

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

GitHub user oliegeon opened a pull request:

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

    CURATOR-350 allow to close executor service on shutdown

    if you pass your executor service when creating you service,
    you still want to be able to decide wether it should be close on
    shutdown or not

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

    $ git pull https://github.com/oliegeon/curator CURATOR-350

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

    https://github.com/apache/curator/pull/163.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 #163
    
----
commit 4d40bbed3c07f5059bf117902bd43661260cf03a
Author: Olivier Liegeon <ol...@imc-chicago.com>
Date:   2016-09-19T20:15:49Z

    CURATOR-350 allow to close executor service on shutdown
    
    if you pass your executor service when creating you service,
    you still want to be able to decide wether it should be close on
    shutdown or not

----


> Allow to close executor service on shutdown
> -------------------------------------------
>
>                 Key: CURATOR-350
>                 URL: https://issues.apache.org/jira/browse/CURATOR-350
>             Project: Apache Curator
>          Issue Type: Improvement
>            Reporter: Olivier Liegeon
>            Assignee: Jordan Zimmerman
>
> In Issue 251, we got the ability to create a ChildrenCache and passing an ExecutorService. 
> This change does allow to close this service when closing the childrenCache. This should be a parameter, false by default to keep current behavior
> in {{CloseableExecutorService}}
> {code}
> /**
>      * @param executorService the service to decorate
>      */
>     public CloseableExecutorService(ExecutorService executorService)
>     {
>        this(executorService, false);
>     }
> {code}
> {code}
> if (shutdownOnClose) {
>             executorService.shutdownNow();
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)