mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SSHD-394) Use an ExecutorService to spawn SftpSubsystem command
Date Mon, 05 Jan 2015 08:09:34 GMT

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

Goldstein Lyor updated SSHD-394:
--------------------------------
    Attachment:     (was: 0006-SSHD-394-Use-an-ExecutorService-to-spawn-SftpSubsyst.patch)

> 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
>         Attachments: 0006-update1-SSHD-394-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)

Mime
View raw message