这是什么问题?
dfvips opened this issue · 1 comments
dfvips commented
Exception in thread "main" java.util.concurrent.RejectedExecutionException: Task online.githuboy.lagou.course.task.MP4Downloader@3e2059ae rejected from online.githuboy.lagou.course.support.ExecutorService$TaskNamedThreadPoolExecutor@398dada8[Running, pool size = 16, active threads = 1, queued tasks = 64, completed tasks = 79]
taskQueueMapping finished: 79->
VideoInfoLoader__
MP4Downloader__
null
null
null
at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2055)
at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:825)
at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1355)
at online.githuboy.lagou.course.support.Downloader.downloadMedia(Downloader.java:149)
at online.githuboy.lagou.course.support.Downloader.start(Downloader.java:63)
at online.githuboy.lagou.course.App.main(App.java:46)
dfvips commented
private final static TaskNamedThreadPoolExecutor executor = new TaskNamedThreadPoolExecutor(16, Integer.MAX_VALUE,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<>(Integer.MAX_VALUE));
改变这里就OK了。