[ 
https://issues.apache.org/jira/browse/SSHD-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet resolved SSHD-394.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 0.14.0
         Assignee: Guillaume Nodet

https://git-wip-us.apache.org/repos/asf?p=mina-sshd.git;a=commitdiff;h=2893dcc42a38bfde654ecc8028005b41afcf887a

> Use an ExecutorService to spawn SftpSubsystem command
> -----------------------------------------------------
>
>                 Key: SSHD-394
>                 URL: https://issues.apache.org/jira/browse/SSHD-394
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.14.0
>            Reporter: Goldstein Lyor
>            Assignee: Guillaume Nodet
>             Fix For: 0.14.0
>
>         Attachments: 
> 0006-SSHD-394-update2-Use-an-ExecutorService-to-spawn-SftpSubsyst.patch
>
>
> The current code simply uses {code:java}new Thread(this).start(){code} This 
> precludes the user from configuring the thread's attributes - name, priority, 
> stack size, thread-group and most important whether it is a daemon or not. By 
> allowing to provide an _ExecutorService_ we enable all these.
> *Note:* the choice for using an _ExecutorService_ rather than a simple(r) 
> _Executor_ is twofold:
> # The documentation for _Executor#execute()_ clearly states: {panel}Executes 
> the given command at some time in the future.  The command may execute in a 
> new thread, in a pooled thread, or in the calling thread, at the discretion 
> of the _Executor_ implementation.{panel}
> In our case we want to make sure that a *new* thread is spawned
> # The _ExecutorService#submit()_ call returns a _Future_ object which we can 
> later use to stop the command when the _destroy()_ method is called



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

Reply via email to