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__)
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()