Skip to content

Commit

Permalink
chore: black .
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and BobTheBuidler committed Nov 14, 2024
1 parent 54f01b3 commit 7128006
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions a_sync/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -454,4 +456,4 @@ def weakref_cb(_, q=self._work_queue):
"AsyncThreadPoolExecutor",
"AsyncProcessPoolExecutor",
"PruningThreadPoolExecutor",
]
]

0 comments on commit 7128006

Please sign in to comment.