-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
学习代码时候发现,
// 阻塞地从队列里获取一个任务
private Runnable getTask() {
boolean timed = workCount.get() > corePoolSize;
try {
return timed ? workQueue.poll(keepAliveTime, timeUnit) : workQueue.take();
} catch (InterruptedException e) {
return null;
}
}这段代码可能会导致所有工作线程因为取不到任务,然后退出
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels