smol-rs / async-channel

Async multi-producer multi-consumer channel
Apache License 2.0
726 stars 38 forks source link

Sending can yield the thread #96

Open NathanRoyer opened 1 month ago

NathanRoyer commented 1 month ago

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

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