projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Starting to move towards python3.9
[python_utils.git]
/
thread_utils.py
diff --git
a/thread_utils.py
b/thread_utils.py
index af6e0e1abe840946a8754e426ca93bd653545ca5..0130cdc510547196d418d6699d1b46b84a6ddf7c 100644
(file)
--- a/
thread_utils.py
+++ b/
thread_utils.py
@@
-6,6
+6,9
@@
import os
import threading
from typing import Callable, Optional, Tuple
import threading
from typing import Callable, Optional, Tuple
+# This module is commonly used by others in here and should avoid
+# taking any unnecessary dependencies back on them.
+
logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__)
@@
-17,6
+20,9
@@
def current_thread_id() -> str:
def is_current_thread_main_thread() -> bool:
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()
return threading.current_thread() is threading.main_thread()