Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def JobFinished(self, file_key):
"""Decrements the number of submitted jobs for the specified key file,
defined as the original file we processed; once the count is back to 0,
remove the entry from our record."""
with Dumper.jobs_condition:
self.jobs_record[file_key] -= 1
if self.jobs_record[file_key] == 0:
del self.jobs_record[file_key]
Dumper.jobs_condition.notify_all()
def JobStarted(self, file_key):
"""Increments the number of submitted jobs for the specified key file,
defined as the original file we processed; note that a single key file
can generate up to 1 + len(self.archs) jobs in the Mac case."""
with Dumper.jobs_condition:
self.jobs_record[file_key] += 1
Dumper.jobs_condition.notify_all()