Skip to content

Commit

Permalink
set timeout for event wait
Browse files Browse the repository at this point in the history
  • Loading branch information
aiudirog committed Oct 17, 2023
1 parent f60d2a1 commit b1dccb4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aiuti/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,9 @@ async def _wrapper(*args: Any, **kwargs: Any) -> Any:

if waiting: # Wait for other loop, maybe across threads
try:
await aio.wait_for(
ensure_aw(event.wait(), loop),
timeout=30,
await ensure_aw(
aio.wait_for(event.wait(), timeout=30),
loop,
)
except RuntimeError: # Target loop most likely closed
pass
Expand Down

0 comments on commit b1dccb4

Please sign in to comment.