1 Reply Latest reply on Nov 2, 2009 6:43 AM by timfox

    AIO pools never get shutdown

    timfox

      I was executing a test which starts and stops servers in a loop, and I noticed on a stack trace there were very many AIO poller/writer threads.

      Looking at the code in AIOSequentialFileFactory it seems the following two executors never get shut down:

       private final Executor writeExecutor = Executors.newSingleThreadExecutor(new HornetQThreadFactory("HornetQ-AIO-writer-pool" + System.identityHashCode(this),
       true));
      
       private final Executor pollerExecutor = Executors.newCachedThreadPool(new HornetQThreadFactory("HornetQ-AIO-poller-pool" + System.identityHashCode(this),
      


      This very bad practice. All executors must be shutdown synchronously when the module stops and termination should be waited for.