Skip to content

Question: Is it best practice to block on recv (async) to detect close faster? #1709

@ivanthewebber

Description

@ivanthewebber

From what I can tell when using the async ClientConnection having a coroutine always blocking on recv seems to accelerate close detection and I'm wondering if this is best practice or documented? I know some libraries require always having a handler or coroutine blocking on recv, so just trying to understand if it's the same. I haven't found a clear recommendation in the docs.

(e.g. independent producer, consumer loops on one ClientConnection via asyncio.gather versus only a producer loop)

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions