[wildfly-dev] Thread Pool Utilities

Brian Stansberry brian.stansberry at redhat.com
Tue Dec 15 14:10:31 EST 2015


I haven't really thought about this and it's quite possible changing 
this stuff is the right thing to do. So just take the following as being 
about clarification and not opposition:

I don't understand the significance of having the thread subsystem or not.

IIRC these services don't expose those methods because the Service 
stop() method is meant to control the pool lifecycle. So if these are 
still MSC services, that reasoning still applies. (Note: it may have 
been bad reasoning.)

Also, these are still used in much the same fashion as they were before 
when we used the threads subsystem. The use has just been inlined into 
other subsystems.

On 12/15/15 12:13 PM, James Perkins wrote:
> Hello All,
> The thread-pool utilities don't currently allow the shutdown() or
> shutdownNow() [1] to be executed on the delegate executor. This made
> sense when we had a thread subsystem, but now that we don't it makes
> these executors hard to use for things like graceful shutdown. For
> example if a graceful shutdown limit has been reached threads submitted
> from these thread-pools continue running as there's no way to shut them
> down and kill running threads.
>
> I'd propose that since these are utilities now that these methods be
> exposed for usage [2]. Does anyone see an issue with that? Or have
> alternative ides?
>
>
> [1]
> :https://github.com/wildfly/wildfly-core/blob/69fed63548cbebed86e31ba376f0f7f147fe04a2/threads/src/main/java/org/jboss/as/threads/ManagedExecutorService.java#L71-L84
> [2]:
> https://github.com/wildfly/wildfly-core/compare/master...jamezp:thread-pool-shutdown
>
> --
> James R. Perkins
> JBoss by Red Hat
>
>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>


-- 
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat


More information about the wildfly-dev mailing list