Auto-scale receiver count with crossbeam-channel in Rust

106 Views Asked by At

When using a multi-sender/multi-receiver channels like crossbeam-channel or async-channel, I would like to dynamically scale the number of receivers based on the channel congestion state. If there are too many pending item is the channel, more receivers should be created. If the channel is near-empty, some receivers may need to stop.

Is there an API in either of the popular multi-receiver channel implementations that would help with this? Is there a different approach for this?

0

There are 0 best solutions below