Skip to content

Commit

Permalink
Lower is_alive lock timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHayes authored Feb 11, 2023
1 parent 10ee3fa commit 50b0a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -2495,7 +2495,7 @@ def is_alive(self):
# Using a small timeout provides backpressure against code that spams
# calls to .is_alive() which may block the main thread from acquiring
# the lock otherwise.
acquired = self._wait_lock.acquire(timeout=0.1)
acquired = self._wait_lock.acquire(timeout=0.00001)
if not acquired:
if self.exit_code is not None:
return False, self.exit_code
Expand Down

0 comments on commit 50b0a79

Please sign in to comment.