pub trait Notify {
// Provided methods
fn last_tx_did_drop(&self) { ... }
fn last_rx_did_drop(&self) { ... }
}
Expand description
Allows the reference-counted object to know when the last write reference or the last read reference is dropped.
Exactly one of these functions will be called.
Provided Methods§
sourcefn last_tx_did_drop(&self)
fn last_tx_did_drop(&self)
Called when the last Tx is dropped.
WARNING: This function is called during a Drop::drop implementation. To avoid deadlock, ensure that it does not acquire a lock that may be held during unwinding.
NOTE: Only called if there are live Rx references.
sourcefn last_rx_did_drop(&self)
fn last_rx_did_drop(&self)
Called when the last Rx is dropped.
WARNING: This function is called during a Drop::drop implementation. To avoid deadlock, ensure that it does not acquire a lock that may be held during unwinding.
NOTE: Only called if there are live Tx references.