projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fighting with type hints.
[python_utils.git]
/
thread_utils.py
diff --git
a/thread_utils.py
b/thread_utils.py
index 4db4cf68b4ef916f323f90bae492d1c59dca361f..2375f3df3938b6a5562911af28202a909b0a0cd7 100644
(file)
--- a/
thread_utils.py
+++ b/
thread_utils.py
@@
-6,7
+6,7
@@
import functools
import logging
import os
import threading
import logging
import os
import threading
-from typing import Callable, Optional, Tuple
+from typing import
Any,
Callable, Optional, Tuple
# This module is commonly used by others in here and should avoid
# taking any unnecessary dependencies back on them.
# This module is commonly used by others in here and should avoid
# taking any unnecessary dependencies back on them.
@@
-62,7
+62,7
@@
def is_current_thread_main_thread() -> bool:
def background_thread(
def background_thread(
- _funct: Optional[Callable],
+ _funct: Optional[Callable
[..., Any]
],
) -> Callable[..., Tuple[threading.Thread, threading.Event]]:
"""A function decorator to create a background thread.
) -> Callable[..., Tuple[threading.Thread, threading.Event]]:
"""A function decorator to create a background thread.