bc0026c3e1
Plus many new examples in "streams" chapter.
13 lines
320 B
Java
13 lines
320 B
Java
// onjava/DaemonThreadPoolExecutor.java
|
|
package onjava;
|
|
import java.util.concurrent.*;
|
|
|
|
public class DaemonThreadPoolExecutor
|
|
extends ThreadPoolExecutor {
|
|
public DaemonThreadPoolExecutor() {
|
|
super(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS,
|
|
new SynchronousQueue<>(),
|
|
new DaemonThreadFactory());
|
|
}
|
|
}
|