From b2989d649ca7e2638184fef950c49d7815334aa7 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 27 Jul 2023 09:15:02 -0600 Subject: [PATCH] DocString for cancel_items_in_queue() --- pympipool/shared_functions/external_interfaces.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pympipool/shared_functions/external_interfaces.py b/pympipool/shared_functions/external_interfaces.py index 9f1d819d..ade7994f 100644 --- a/pympipool/shared_functions/external_interfaces.py +++ b/pympipool/shared_functions/external_interfaces.py @@ -10,6 +10,13 @@ def cancel_items_in_queue(que): + """ + Cancel items which are still waiting in the queue. If the executor is busy tasks remain in the queue, so the future + objects have to be cancelled when the executor shuts down. + + Args: + que (queue.Queue): Queue with task objects which should be executed + """ while True: try: item = que.get_nowait()