Skip to content

No way to tell if AsyncChannel is closed #355

Open
@eaigner

Description

@eaigner

When a channel is closed, send() simply will return instantly.

If you have an API that returns a channel for consumption, the producer has no way of knowing a channel was closed by the consumer. send() should really throw an error instead of just losing all back pressure instantly. That kind of defeats the purpose of a channel.

If any producer and consumer is allowed to call finish(), any producer and consumer must also be able to check if a channel was finished.

This has nothing to do with a 1:1 relationship as stated in #304

Also for instance in go, writing to a closed channel is forbidden and will panic.

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