-
Notifications
You must be signed in to change notification settings - Fork 758
Open
Labels
Description
| result = await asyncio.to_thread(evt.wait, timeout) |
Can be replaced with (however, note for the future: it is better to rely on asyncio.timeout here):
try:
result = await asyncio.wait_for(evt, timeout)
except asyncio.TimeoutError:
result = FalseAnd the previous branch can be deleted accordingly, since there will be no more threads here.
Originally posted by @x42005e1f in #356 (comment)