fn register_sender_callback<F>(&self, sender: usize, cb: F)
    where
        F: Fn() + Send + Sync + 'static,
    {
        debug_assert!(sender < self.npeers);
        debug_assert!(self.sender_callbacks[sender].get().is_none());
        let _res = self.sender_callbacks[sender].set(Box::new(cb) as Box<dyn Fn() + Send + Sync>);
        debug_assert!(_res.is_ok());
    }
/// Register callback to be invoked whenever the `ready_to_send` condition
/// becomes true.
///
/// The callback can be setup at most once (e.g., when a scheduler attaches
/// to the circuit) and cannot be unregistered.  Notifications delivered
/// before the callback is registered are lost.  The client should call
/// `ready_to_send` after installing the callback to check the status.
///
/// After the callback has been registered, notifications are delivered with
/// at-least-once semantics: a notification is generated whenever the
/// status changes from not ready to ready, but spurious notifications
/// can occur occasionally.  Therefore, the user must check the status
/// explicitly by calling `ready_to_send` or be prepared that `try_send_all`
/// can fail.
Register callback to be invoked whenever the `ready_to_send` condition
becomes true.

The callback can be setup at most once  and cannot be unregistered.  Notifications delivered
before the callback is registered are lost.  The client should call
`ready_to_send` after installing the callback to check the status.

After the callback has been registered, notifications are delivered with
at-least-once semantics: a notification is generated whenever the
status changes from not ready to ready, but spurious notifications
can occur occasionally.  Therefore, the user must check the status
explicitly by calling `ready_to_send` or be prepared that `try_send_all`
can fail.
Register callback to be invoked whenever the ` ready_to_send ` condition becomes true . The callback can be setup at most once and cannot be unregistered . Notifications delivered before the callback is registered are lost . The client should call ` ready_to_send ` after installing the callback to check the status . After the callback has been registered notifications are delivered with at - least - once semantics : a notification is generated whenever the status changes from not ready to ready but spurious notifications can occur occasionally . Therefore the user must check the status explicitly by calling ` ready_to_send ` or be prepared that ` try_send_all ` can fail .
fn register_sender_callback<F>(&self, sender: usize, cb: F)
    where
        F: Fn() + Send + Sync + 'static,
    {
        debug_assert!(sender < self.npeers);
        debug_assert!(self.sender_callbacks[sender].get().is_none());
        let _res = self.sender_callbacks[sender].set(Box::new(cb) as Box<dyn Fn() + Send + Sync>);
        debug_assert!(_res.is_ok());
    }
fn register_sender_callback < F > ( & self , sender : usize , cb : F ) where F : Fn ( ) + Send + Sync + ' static , { debug_assert ! ( sender self npeers ) ; debug_assert ! ( self sender_callbacks [ sender ] get ( ) is_none ( ) ) ; let _res = self . sender_callbacks [ sender ] . set ( Box :: new ( cb ) as Box < dyn Fn ( ) + Send + Sync > ) ; debug_assert ! ( _res is_ok ( ) ) ; }
Register callback to be invoked whenever the `ready_to_send` condition
becomes true.
Register callback to be invoked whenever the ` ready_to_send ` condition becomes true .
&self
sender
usize
cb
F