pyocf: extend OcfCompletion

1. add optional timeout and return value to wait()
2. add method to check whether completion was triggered

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2022-06-15 17:43:49 +02:00 committed by Jan Musial
parent e2ea2b41e6
commit 81396681f4

View File

@ -103,8 +103,11 @@ class OcfCompletion:
return complete
def wait(self):
self.e.wait()
def wait(self, timeout=None):
return self.e.wait(timeout=timeout)
def completed(self):
return self.e.is_set()
class OcfError(BaseException):