X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=thread_utils.py;fp=thread_utils.py;h=0130cdc510547196d418d6699d1b46b84a6ddf7c;hb=709370b2198e09f1dbe195fe8813602a3125b7f6;hp=bb15c034b9e4e02f273b98dbc77410072878e089;hpb=b10d30a46e601c9ee1f843241f2d69a1f90f7a94;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()