mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-07 07:35:50 +01:00
Don't sleep in job manager after having run jobs. This improves latency in some situations.
This commit is contained in:
commit
a5cf477417
1 changed files with 4 additions and 1 deletions
|
|
@ -317,9 +317,11 @@ def run(self):
|
|||
else:
|
||||
self.detect_device()
|
||||
|
||||
do_sleep = True
|
||||
while True:
|
||||
job = self.next()
|
||||
if job is not None:
|
||||
do_sleep = False
|
||||
self.current_job = job
|
||||
if self.device is not None:
|
||||
self.device.set_progress_reporter(job.report_progress)
|
||||
|
|
@ -327,7 +329,8 @@ def run(self):
|
|||
self.current_job = None
|
||||
else:
|
||||
break
|
||||
time.sleep(self.sleep_time)
|
||||
if do_sleep:
|
||||
time.sleep(self.sleep_time)
|
||||
|
||||
# We are exiting. Call the shutdown method for each plugin
|
||||
for p in self.devices:
|
||||
|
|
|
|||
Loading…
Reference in a new issue