Example usage for java.util.concurrent ThreadPoolExecutor ThreadPoolExecutor

List of usage examples for java.util.concurrent ThreadPoolExecutor ThreadPoolExecutor

Introduction

In this page you can find the example usage for java.util.concurrent ThreadPoolExecutor ThreadPoolExecutor.

Prototype

public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit,
        BlockingQueue<Runnable> workQueue) 

Source Link

Document

Creates a new ThreadPoolExecutor with the given initial parameters, the default thread factory and the default rejected execution handler.

Usage

From source file:zlyh.dmitry.recaller.services.RecordService.java

@Override
public void onCreate() {
    super.onCreate();
    nosizequeue = new SynchronousQueue<>();
    executor = new ThreadPoolExecutor(1, 1, 1, TimeUnit.MINUTES, nosizequeue);
}