Skip to content

Redundant logic after using aiologic #372

@ultmaster

Description

@ultmaster

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 = False

And the previous branch can be deleted accordingly, since there will be no more threads here.

Originally posted by @x42005e1f in #356 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions