flume
flume copied to clipboard
Please support creating a Receiver from a Sender and vice versa
Receiver and Sender both contain the same Shared structure. I'd love to have a Sender::make_receiver function that produces a Receiver from a Sender (and vice versa with Receiver::make_sender), to allow storing only one in a data structure rather than storing the pair.
For precedent, see https://docs.rs/tokio/latest/tokio/sync/watch/struct.Sender.html#method.subscribe .
That sounds like a reasonable suggestion. I'm very happy to accept a PR. Alternatively, I'll get round to it when I can find the time.