Skip to content

feat(mpmc): add a competing queue #211

Description

@tisonkun

Parent: #206

Goal

Add bounded and unbounded MPMC queues in which cloneable receivers compete for each value and every accepted value is delivered exactly once.

Direction

  • Keep the public path at asyncband::mpmc.
  • Use targeted waiter notification with cancellation handoff rather than waking every sender or receiver.
  • Keep bounded capacity strict and unbounded sends synchronous.
  • Keep implementation policy and storage types private.

Acceptance criteria

  • Cover clone counts, ordering, disconnection, draining, cancellation, exact-once delivery, and bounded progress under contention.
  • Benchmark 1P/1C, 1P/8C, 8P/1C, and 8P/8C for bounded and unbounded modes.
  • Avoid sustained order-of-magnitude regressions against semantically comparable MPMC channels.

Depends on #208. The implementation may share narrowly scoped machinery established by #209 without forcing single- and competing-consumer paths into one generic policy framework.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions