Skip to content

Commit 225005d

Browse files
committed
Also notify waiting lists when a single URL has been schedules, instead
of only after scheduleAll.
1 parent bdbdc3e commit 225005d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/java/edu/uci/ics/crawler4j/frontier/Frontier.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ public void schedule(WebURL url) {
120120
logger.error("Error while putting the url in the work queue", e);
121121
}
122122
}
123+
124+
// Wake up threads
125+
synchronized (waitingList) {
126+
waitingList.notifyAll();
127+
}
123128
}
124129

125130
public void getNextURLs(int max, List<WebURL> result) {
@@ -198,4 +203,4 @@ public void finish() {
198203
waitingList.notifyAll();
199204
}
200205
}
201-
}
206+
}

0 commit comments

Comments
 (0)