From 709370b2198e09f1dbe195fe8813602a3125b7f6 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Wed, 8 Sep 2021 23:29:05 -0700 Subject: Add doctests to some of this stuff. --- thread_utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'thread_utils.py') diff --git a/thread_utils.py b/thread_utils.py index bb15c03..0130cdc 100644 --- a/thread_utils.py +++ b/thread_utils.py @@ -20,6 +20,9 @@ def current_thread_id() -> str: def is_current_thread_main_thread() -> bool: + """Returns True is the current (calling) thread is the process' main + thread and False otherwise. + """ return threading.current_thread() is threading.main_thread() -- cgit v1.3