mirror of
https://github.com/JoelBender/bacpypes
synced 2025-10-13 00:42:44 +08:00
Python 3.2 Condition.wait() with timeout returns True/False. Added return to IOCB.wait()
This commit is contained in:
parent
e6c5a80555
commit
71ed5d6eb5
|
@ -141,12 +141,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)."""
|
||||
|
|
Loading…
Reference in New Issue
Block a user