mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-11 23:42:38 +00:00
Update the comment to reflect the updated implementation
This commit is contained in:
parent
20ba53f586
commit
4860d16401
@ -974,14 +974,13 @@ class QueueMixin(HookMixin):
|
|||||||
d = DeferredContext(defer.Deferred())
|
d = DeferredContext(defer.Deferred())
|
||||||
|
|
||||||
# During startup we scanned the collective for items to download.
|
# During startup we scanned the collective for items to download.
|
||||||
# We do not need to perform another scan before processing our
|
# If we found work to do, we do not need to perform another scan
|
||||||
# work queue. More importantly, the logic for determining which
|
# here. More importantly, the logic for determining which items
|
||||||
# items to download is *not correct* in the case where two scans
|
# to download is *not correct* in the case where two scans are
|
||||||
# are performed with no intermediate emptying of the work queue.
|
# performed with no intermediate emptying of the work queue.
|
||||||
# Therefore, skip the scan in the first processing iteration.
|
# Therefore, skip the scan any time there is queued work. The
|
||||||
# Either there will be work in the queue from the initial scan or
|
# only time we expect there to be any, though, is on the first
|
||||||
# not. Either way, when we get here again on the next iteration,
|
# time through this loop.
|
||||||
# we'll go the other way and perform a scan.
|
|
||||||
if not self._deque:
|
if not self._deque:
|
||||||
# adds items to our deque
|
# adds items to our deque
|
||||||
d.addCallback(lambda ignored: self._perform_scan())
|
d.addCallback(lambda ignored: self._perform_scan())
|
||||||
|
Loading…
Reference in New Issue
Block a user