Package 

Class AndroidExecutors

    • Method Detail

      • newCachedThreadPool

         static ExecutorService newCachedThreadPool()

        Creates a proper Cached Thread Pool. Tasks will reuse cached threads if availableor create new threads until the core pool is full. tasks will then be queued. If antask cannot be queued, a new thread will be created unless this would exceed max poolsize, then the task will be rejected. Threads will time out after 1 second.

        Core thread timeout is only available on android-9+.

      • newCachedThreadPool

         static ExecutorService newCachedThreadPool(ThreadFactory threadFactory)

        Creates a proper Cached Thread Pool. Tasks will reuse cached threads if availableor create new threads until the core pool is full. tasks will then be queued. If antask cannot be queued, a new thread will be created unless this would exceed max poolsize, then the task will be rejected. Threads will time out after 1 second.

        Core thread timeout is only available on android-9+.

        Parameters:
        threadFactory - the factory to use when creating new threads