postage-rs icon indicating copy to clipboard operation
postage-rs copied to clipboard

Would like watch::Sender::send_if_changed` or borrow_then_send_if_changed

Open ijackson opened this issue 1 year ago • 0 comments

In some use cases the contained value is PartialEq and it might be nice to be able to avoid waking up the receivers if the value to be sent hasn't changed. Right now the only way to do that seems to be to borrow, compare, and then reborrow (with careful ordering to avoid deadlock).

ijackson avatar Jul 18 '22 13:07 ijackson