[infinispan-issues] [JBoss JIRA] (ISPN-5175) LazyInitializingExecutorService.isShutdown() returns true before service is shutdown

Paul Ferraro (JIRA) issues at jboss.org
Fri Jan 23 16:47:49 EST 2015


     [ https://issues.jboss.org/browse/ISPN-5175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Ferraro updated ISPN-5175:
-------------------------------
    Description: 
ExecutorService.isShutdown() should not return true until shutdown() or shutdownNow() is invoked.  A return value of true should mean that the executor no longer accepts new submissions.  However, LazyInitializingExecutorService.isShutdown() also returns true if the executor was not yet initialized.

The same issue applies to isTerminated().

This is particularly relevant to DefaultExecutorService, which throws an IllegalStateException if constructed with a new LazyInitializingExecutorService.

  was:
ExecutorService.isShutdown() should not return true until shutdown() or shutdownNow() is invoked.  A return value of true should mean that the executor no longer accepts new submissions.  However, LazyInitializingExecutorService.isShutdown() returns true if the executor was not yet initialized.

The same reasoning applies to isTerminated().

This is particularly relevant to DefaultExecutorService, which throws an IllegalStateException if constructed with a new LazyInitializingExecutorService.



> LazyInitializingExecutorService.isShutdown() returns true before service is shutdown
> ------------------------------------------------------------------------------------
>
>                 Key: ISPN-5175
>                 URL: https://issues.jboss.org/browse/ISPN-5175
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 7.0.3.Final, 7.1.0.CR2
>            Reporter: Paul Ferraro
>
> ExecutorService.isShutdown() should not return true until shutdown() or shutdownNow() is invoked.  A return value of true should mean that the executor no longer accepts new submissions.  However, LazyInitializingExecutorService.isShutdown() also returns true if the executor was not yet initialized.
> The same issue applies to isTerminated().
> This is particularly relevant to DefaultExecutorService, which throws an IllegalStateException if constructed with a new LazyInitializingExecutorService.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the infinispan-issues mailing list