1
0
Fork 0

cancel jobs correctly

This commit is contained in:
Sean Sube 2023-02-04 10:10:40 -06:00
parent c3b0c5e3e3
commit 1491a9e1e0
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 1 additions and 2 deletions

View File

@ -92,8 +92,7 @@ class DevicePoolExecutor:
if job.future.cancel():
return True
else:
with job.cancel.get_lock():
job.cancel.value = True
job.set_cancel()
def done(self, key: str) -> bool:
for job in self.jobs: