Skip to content

Sending can yield the thread #96

Open
@NathanRoyer

Description

@NathanRoyer

When we call try_send on a sender, here's what I think is happening:

  • ConcurrentQueue::push is called here
  • If the queue is unbounded, Unbounded::push is called here
  • If the queue reached its current capacity, busy_wait is called here
  • Which either spins or yields the thread, as defined here

I find it weird that we end up yielding the thread in async code.
If this is expected, I think it should be documented.

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