summaryrefslogtreecommitdiff
path: root/thread_utils.py
diff options
context:
space:
mode:
authorScott <[email protected]>2022-01-26 21:35:20 -0800
committerScott <[email protected]>2022-01-26 21:35:20 -0800
commite6f32fdd9b373dfcd100c7accb41f57d83c2f0a1 (patch)
treeeea4985bc43238fbd070c783441f08988f581973 /thread_utils.py
parent36fea7f15ed17150691b5b3ead75450e575229ef (diff)
Ahem. Still running black?
Diffstat (limited to 'thread_utils.py')
-rw-r--r--thread_utils.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/thread_utils.py b/thread_utils.py
index ad1f0bf..d8c85f4 100644
--- a/thread_utils.py
+++ b/thread_utils.py
@@ -61,9 +61,7 @@ def background_thread(
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)
@@ -130,9 +128,7 @@ def periodically_invoke(
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)