X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=thread_utils.py;h=0130cdc510547196d418d6699d1b46b84a6ddf7c;hb=5e1bced276766fec9d4c408790c99d4a26d267e0;hp=bb15c034b9e4e02f273b98dbc77410072878e089;hpb=09e6d10face80d98a4578ff54192b5c8bec007d7;p=python_utils.git 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()