Skip to content

What happens in the case of multiple senders/receivers? #247

@gopherbot

Description

@gopherbot

by josef.svenningsson:

The Go language specification is silent about what happens if there are
multiple senders and/or receivers on a channel. Suppose there are two
receivers blocked, waiting to receive from a channel. When a sender sends a
value on the channel, who gets it?

If I had a say in the matter I would go for the natural and intuitive FIFO
semantics where the receiver which was first to block is the one to receive
a message when it becomes available. Same thing for blocking senders.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions