Skip to content

Commit 64e6a98

Browse files
committed
Add dead-lock note for QueueScheduler.
1 parent e735e4e commit 64e6a98

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

webmagic-core/src/main/java/us/codecraft/webmagic/scheduler/QueueScheduler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
import java.util.concurrent.LinkedBlockingQueue;
55

66
import us.codecraft.webmagic.Request;
7+
import us.codecraft.webmagic.Site;
78
import us.codecraft.webmagic.Task;
89

910
/**
1011
* Basic Scheduler implementation.<br>
1112
* Store urls to fetch in LinkedBlockingQueue and remove duplicate urls by HashMap.
1213
*
14+
* Note: if you use this {@link QueueScheduler}
15+
* with {@link Site#getCycleRetryTimes()} enabled, you may encountered dead-lock
16+
* when the queue is full.
17+
*
1318
* @author code4crafter@gmail.com <br>
1419
* @since 0.1.0
1520
*/

0 commit comments

Comments
 (0)