public void addFinishedTarget(Target target) { // 向finishedTargets队列中加入一个任务 synchronized (finishedTargets) { finishedTargets.notify(); finishedTargets.add(target); } }
void add(Target t) { synchronized (pending) { pending.add(t); pending.notify(); } }