summaryrefslogtreecommitdiff
path: root/thread_utils.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2021-09-08 23:29:05 -0700
committerScott Gasch <[email protected]>2021-09-08 23:29:05 -0700
commit709370b2198e09f1dbe195fe8813602a3125b7f6 (patch)
tree5bbe521d7973f86526ed09d4411a5b3ff0e23aaa /thread_utils.py
parentb10d30a46e601c9ee1f843241f2d69a1f90f7a94 (diff)
Add doctests to some of this stuff.
Diffstat (limited to 'thread_utils.py')
-rw-r--r--thread_utils.py3
1 files changed, 3 insertions, 0 deletions
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()