From: David Stainton Date: Fri, 17 Apr 2015 18:58:08 +0000 (+0100) Subject: Teach uploade deque append to not block (potentially?) X-Git-Url: https://git.rkrishnan.org/pf/content/en/service?a=commitdiff_plain;h=62eed026146b4230dda14dc8effa2fb6d1aa985d;p=tahoe-lafs%2Ftahoe-lafs.git Teach uploade deque append to not block (potentially?) --- diff --git a/src/allmydata/frontends/drop_upload.py b/src/allmydata/frontends/drop_upload.py index ed16c893..33712897 100644 --- a/src/allmydata/frontends/drop_upload.py +++ b/src/allmydata/frontends/drop_upload.py @@ -2,7 +2,7 @@ import sys, os from collections import deque -from twisted.internet import defer +from twisted.internet import defer, reactor from twisted.python.failure import Failure from twisted.python.filepath import FilePath from twisted.application import service @@ -141,7 +141,7 @@ class DropUploader(service.MultiService): self._upload_deque.append(path) self._pending.add(path) if self.is_upload_ready: - self._process_deque() + reactor.callLater(0, self._process_deque) def _process_deque(self): while True: