From 3ee8c37955205a6939fc6ef797fec566af78d8eb Mon Sep 17 00:00:00 2001 From: rdbende Date: Mon, 6 Nov 2023 18:19:49 +0100 Subject: [PATCH] Update docstring --- porcupine/_ipc.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/porcupine/_ipc.py b/porcupine/_ipc.py index 57c37a015..50bbb05c5 100644 --- a/porcupine/_ipc.py +++ b/porcupine/_ipc.py @@ -52,14 +52,8 @@ def _listener2queue(listener: connection.Listener, object_queue: queue.Queue[Any def start_session() -> tuple[connection.Listener, queue.Queue[Any]]: - """Context manager that listens for send(). - - Use this as a context manager: - - # the queue will contain objects from send() - with session() as message_queue: - # start something that processes items in the queue and run - # the application + """Start the listener session. Return the listener object, and the message queue. + The listener has to be closed manually. """ message_queue: queue.Queue[Any] = queue.Queue() listener = connection.Listener()