forked from j62/ctbrec
Reduce core pool size to 0 for the download thread pool
Most of the time only one thread is used, so we can save resources by reducing the core pool size
This commit is contained in:
parent
296585463a
commit
3f4973137c
|
@ -66,7 +66,7 @@ public abstract class AbstractHlsDownload extends AbstractDownload {
|
||||||
protected volatile boolean running = false;
|
protected volatile boolean running = false;
|
||||||
protected Model model = new UnknownModel();
|
protected Model model = new UnknownModel();
|
||||||
protected transient LinkedBlockingQueue<Runnable> downloadQueue = new LinkedBlockingQueue<>(50);
|
protected transient LinkedBlockingQueue<Runnable> downloadQueue = new LinkedBlockingQueue<>(50);
|
||||||
protected transient ExecutorService downloadThreadPool = new ThreadPoolExecutor(5, 5, 2, TimeUnit.MINUTES, downloadQueue, createThreadFactory());
|
protected transient ExecutorService downloadThreadPool = new ThreadPoolExecutor(0, 5, 20, TimeUnit.SECONDS, downloadQueue, createThreadFactory());
|
||||||
protected State state = State.UNKNOWN;
|
protected State state = State.UNKNOWN;
|
||||||
private int playlistEmptyCount = 0;
|
private int playlistEmptyCount = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue