Let Job.join accept a timeout.

This commit is contained in:
voussoir 2021-11-20 18:48:05 -08:00
parent f7250f8157
commit 039ac45e17
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -414,8 +414,8 @@ class Job:
self._done_event.set()
def join(self):
def join(self, timeout=None):
'''
Block until this job runs and completes.
'''
self._done_event.wait()
self._done_event.wait(timeout=timeout)