Skip to content

Commit e7d30a0

Browse files
committed
SynCom.any() now returns None on timeout.
1 parent ebde27e commit e7d30a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

syncom_as/syncom.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ def send(self, obj):
106106
else:
107107
self.lsttx.append(pickle.dumps(obj))
108108

109+
# Number of queued objects (None on timeout)
109110
def any(self):
110-
return len(self.lstrx)
111+
if self._running:
112+
return len(self.lstrx)
111113

112114
# Wait for an object. Return None on timeout.
113115
# If in string mode returns a string (or None on t/o)

0 commit comments

Comments
 (0)