diff --git a/a_sync/executor.py b/a_sync/executor.py index d26f2579..38e811b1 100644 --- a/a_sync/executor.py +++ b/a_sync/executor.py @@ -320,7 +320,9 @@ def _worker( with executor._adjusting_lock: # NOTE: NEW # NOTE: We keep a minimum of one thread active to prevent locks - if len(executor) > 1 or executor._idle_semaphore.acquire(blocking=False): # NOTE: NEW + if len(executor) > 1 or executor._idle_semaphore.acquire( + blocking=False + ): # NOTE: NEW t = threading.current_thread() # NOTE: NEW executor._threads.remove(t) # NOTE: NEW thread._threads_queues.pop(t) # NOTE: NEW @@ -454,4 +456,4 @@ def weakref_cb(_, q=self._work_queue): "AsyncThreadPoolExecutor", "AsyncProcessPoolExecutor", "PruningThreadPoolExecutor", -] \ No newline at end of file +]