1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-10-27 00:57:47 +08:00

pass along all the args and kwargs to wait() and return what it returns (returns True except if a timeout is given and the operation times out, new in 3.1+)

This commit is contained in:
Joel Bender
2018-06-19 11:36:31 -04:00
parent 68ca5ec151
commit 21fc057587
3 changed files with 9 additions and 9 deletions

View File

@@ -140,12 +140,12 @@ class IOCB(DebugContents):
if self.ioComplete.isSet():
self.trigger()
def wait(self, *args):
def wait(self, *args, **kwargs):
"""Wait for the completion event to be set."""
if _debug: IOCB._debug("wait(%d) %r", self.ioID, args)
if _debug: IOCB._debug("wait(%d) %r %r", self.ioID, args, kwargs)
# waiting from a non-daemon thread could be trouble
self.ioComplete.wait(*args)
return self.ioComplete.wait(*args, **kwargs)
def trigger(self):
"""Set the completion event and make the callback(s)."""