java.lang.Runnablepublic final class TodoThread
extends java.lang.Thread
VisitState from the Workbench and adds it
to the Frontier.todo queue. Note that we use the blocking dequeue method, which will take
care of delays due to politeness, so this thread does not need to do any busy polling.
FetchingThread instances will later remove the VisitState from the Frontier.todo queue.
This design has been chosen so to minimize contention on the Workbench, as its
state changes require logarithmic time. Only this thread, the DoneThread, the Distributor and DNSThread/ParsingThread instances
access directly the Workbench—access by FetchingThread and ParsingThread instances is mediated
by the Frontier.todo wait-free queue. As a side-effect, if a VisitState with a very low VisitState.nextFetch
value comes back to life, it will be placed in the correct position on the Workbench,
but not in the Frontier.todo queue.
| Constructor | Description |
|---|---|
TodoThread(Frontier frontier) |
Instantiates the thread.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
run() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic TodoThread(Frontier frontier)
frontier - the frontier instantiating the thread.