MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / drop

Method drop

flow-rs/src/channel/inner.rs:205–211  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

203
204impl<T> Drop for Sender<T> {
205 fn drop(&mut self) {
206 // Decrement the sender count and close the channel if it drops down to zero.
207 if self.channel.sender_count.fetch_sub(1, Ordering::AcqRel) == 1 {
208 self.channel.close();
209 self.close_ops.notify(usize::MAX);
210 }
211 }
212}
213
214impl<T> fmt::Debug for Sender<T> {

Callers

nothing calls this directly

Calls 2

notifyMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected