From 152adcb777551550f8546ca7f077e05a0040f7c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 25 Jun 2024 12:10:28 +0200 Subject: [PATCH] Add-on: document timeout parameter of `PackThread.poll()` The timeout should be specified in seconds, which wasn't documented before. No functional changes. --- addon/flamenco/bat/interface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addon/flamenco/bat/interface.py b/addon/flamenco/bat/interface.py index a232aef3..97c66d66 100644 --- a/addon/flamenco/bat/interface.py +++ b/addon/flamenco/bat/interface.py @@ -180,9 +180,9 @@ class PackThread(threading.Thread): def poll(self, timeout: Optional[int] = None) -> Optional[Message]: """Poll the queue, return the first message or None if there is none. - :param timeout: Max time to wait for a message to appear on the queue. - If None, will not wait and just return None immediately (if there is - no queued message). + :param timeout: Max time to wait for a message to appear on the queue, + in seconds. If None, will not wait and just return None immediately + (if there is no queued message). """ try: return self.queue.get(block=timeout is not None, timeout=timeout)