fn clone(&self) -> Self {
        // Not referenced, we can simply clone the fields
        if !self.has_ref {
            return Self {
                state: self.state.clone(),
                has_ref: false,
            };
        }

        let state = Arc::clone(&self.state);

        // Only need to increase the ref count since the tsfn is already referenced
        state.ref_count.fetch_add(1, Ordering::Relaxed);

        Self {
            state,
            has_ref: true,
        }
    }
/// Returns a clone of the Channel instance that shares the internal
/// unbounded queue with the original channel. Scheduling callbacks on the
/// same queue is faster than using separate channels, but might lead to
/// starvation if one of the threads posts significantly more callbacks on
/// the channel than the other one.
///
/// Cloned and referenced Channel instances might trigger additional
/// event-loop tick when dropped. Channel can be wrapped into an Arc and
/// shared between different threads/callers to avoid this.
Returns a clone of the Channel instance that shares the internal
unbounded queue with the original channel. Scheduling callbacks on the
same queue is faster than using separate channels, but might lead to
starvation if one of the threads posts significantly more callbacks on
the channel than the other one.

Cloned and referenced Channel instances might trigger additional
event-loop tick when dropped. Channel can be wrapped into an Arc and
shared between different threads/callers to avoid this.
Returns a clone of the Channel instance that shares the internal unbounded queue with the original channel . Scheduling callbacks on the same queue is faster than using separate channels but might lead to starvation if one of the threads posts significantly more callbacks on the channel than the other one . Cloned and referenced Channel instances might trigger additional event - loop tick when dropped . Channel can be wrapped into an Arc and shared between different threads / callers to avoid this .
fn clone(&self) -> Self {
        // Not referenced, we can simply clone the fields
        if !self.has_ref {
            return Self {
                state: self.state.clone(),
                has_ref: false,
            };
        }
        let state = Arc::clone(&self.state);
        // Only need to increase the ref count since the tsfn is already referenced
        state.ref_count.fetch_add(1, Ordering::Relaxed);
        Self {
            state,
            has_ref: true,
        }
    }
fn clone ( & self ) -> Self { // Not referenced, we can simply clone the fields if ! self . has_ref { return Self { state : self . state . clone ( ) , has_ref : false , } ; } let state = Arc :: clone ( & self . state ) ; // Only need to increase the ref count since the tsfn is already referenced state . ref_count . fetch_add ( 1 , Ordering :: Relaxed ) ; Self { state , has_ref : true , } }
Returns a clone of the Channel instance that shares the internal
unbounded queue with the original channel.
Returns a clone of the Channel instance that shares the internal unbounded queue with the original channel .
&self