Java Reference
In-Depth Information
TrackingExecutor has an unavoidable race condition that could make it yield false pos-
itives: tasks that are identified as cancelled but actually completed. This arises because the
thread pool could be shut down between when the last instruction of the task executes and
when the pool records the task as complete. This is not a problem if tasks are idempotent (if
performing them twice has the same effect as performing them once), as they typically are in
a web crawler. Otherwise, the application retrieving the cancelled tasks must be aware of this
risk and be prepared to deal with false positives.
Search WWH ::




Custom Search