On Fri, Apr 6, 2018 at 1:02 AM, Alan Bateman <alan.bate...@oracle.com> wrote:
> On 05/04/2018 22:45, Tony Printezis wrote: > >> >> We recently hit another interesting issue with the NIO thread-local >> DirectByteBuffer cache. One of our services seems to create and drop >> threads at regular intervals. I assume this is due to a thread pool >> dynamically resizing itself. >> > ThreadPoolExecutor will replace any worker thread that had a throwing task, but that only happens on execute, (not submit, because of additional wrapping by a Future). Perhaps a mistake that is too late to fix. Keep your own worker threads from dying by making sure that all tasks are Future-wrapped.