[
https://issues.apache.org/jira/browse/DIRMINA-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16840440#comment-16840440
]
David M. Lloyd commented on DIRMINA-1108:
-----------------------------------------
Normally thread pool termination with `shutdown` should be immediate (all
threads terminating) as long as there are no running or queued tasks; if that's
not the case then I'd call it a bug, no matter what implementation it showed up
in. `shutdownNow` would only be for unusual situations as it's a sort of
"force stop" which could have unwanted side-effects.
> ThreadPoolExecutors should terminate faster
> -------------------------------------------
>
> Key: DIRMINA-1108
> URL: https://issues.apache.org/jira/browse/DIRMINA-1108
> Project: MINA
> Issue Type: Improvement
> Affects Versions: 2.1.2
> Reporter: Guus der Kinderen
> Priority: Minor
>
> I've observed that the termination of
> {{org.apache.mina.filter.executor.PriorityThreadPoolExecutor}} takes another
> 30 seconds after the last task was executed. More specifically, it takes 30
> seconds "to long" before
> {{org.apache.mina.filter.executor.PriorityThreadPoolExecutor#awaitTermination}}
> returns {{true}}.
> It is likely that this issue also applies to
> {{org.apache.mina.filter.executor.OrderedThreadPoolExecutor}}, and maybe
> {{org.apache.mina.filter.executor.UnorderedThreadPoolExecutor}}, as a lot of
> code is shared between these implementations. I did not explicitly verify
> these implementations though.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)