Class XAThreadPool


  • public class XAThreadPool
    extends java.lang.Object
    Fast and minimalistic thread pool from which threads can be reserved and used many times until they are manually released.
    Author:
    Ludovic Orban
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  XAThreadPool.MultiRunner
      Pooled thread wrapper which allows reuse of the same thread
    • Constructor Summary

      Constructors 
      Constructor Description
      XAThreadPool()  
    • Constructor Detail

      • XAThreadPool

        public XAThreadPool()
    • Method Detail

      • getMultiRunner

        public XAThreadPool.MultiRunner getMultiRunner()
        Reserve a thread from the pool
        Returns:
        a MultiRunner which wraps the reserved thread
      • shutdown

        public void shutdown()
        Shutdown the thread pool and release all resources