projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Trying to get black to run in git's pre-commit hook and actually
[python_utils.git]
/
thread_utils.py
diff --git
a/thread_utils.py
b/thread_utils.py
index ad1f0bf9029b3232ba9cbd28b085afade91f0186..d8c85f46fbcaed33864d591458c64a1cebeb162d 100644
(file)
--- a/
thread_utils.py
+++ b/
thread_utils.py
@@
-61,9
+61,7
@@
def background_thread(
def wrapper(funct: Callable):
@functools.wraps(funct)
def wrapper(funct: Callable):
@functools.wraps(funct)
- def inner_wrapper(
- *a, **kwa
- ) -> Tuple[threading.Thread, threading.Event]:
+ def inner_wrapper(*a, **kwa) -> Tuple[threading.Thread, threading.Event]:
should_terminate = threading.Event()
should_terminate.clear()
newargs = (*a, should_terminate)
should_terminate = threading.Event()
should_terminate.clear()
newargs = (*a, should_terminate)
@@
-130,9
+128,7
@@
def periodically_invoke(
should_terminate = threading.Event()
should_terminate.clear()
newargs = (should_terminate, *args)
should_terminate = threading.Event()
should_terminate.clear()
newargs = (should_terminate, *args)
- thread = threading.Thread(
- target=helper_thread, args=newargs, kwargs=kwargs
- )
+ thread = threading.Thread(target=helper_thread, args=newargs, kwargs=kwargs)
thread.start()
logger.debug(f'Started thread {thread.name} tid={thread.ident}')
return (thread, should_terminate)
thread.start()
logger.debug(f'Started thread {thread.name} tid={thread.ident}')
return (thread, should_terminate)