fn add_sink(&self, conn_uuid: u128, sender: ChatSender) {
        let mut mutable = self.mutable.lock();
        if conn_uuid == self.session_id {
            // if this is our producer save it for later (shutdown)
            mutable.sender_producer.replace(sender);
            log::debug!("consumer {} producer is set", self.session_id);
        } else {
            // otherwise, this is a producer we'll forward to
            log::debug!("consumer {} sending input to producer {}", self.session_id, conn_uuid);
            mutable.senders.insert(conn_uuid, sender);
        }
    }
// add a sink, which is a producer's sender
add a sink, which is a producer's sender
add a sink which is a producer ' s sender
fn add_sink(&self, conn_uuid: u128, sender: ChatSender) {
        let mut mutable = self.mutable.lock();
        if conn_uuid == self.session_id {
            // if this is our producer save it for later (shutdown)
            mutable.sender_producer.replace(sender);
            log::debug!("consumer {} producer is set", self.session_id);
        } else {
            // otherwise, this is a producer we'll forward to
            log::debug!("consumer {} sending input to producer {}", self.session_id, conn_uuid);
            mutable.senders.insert(conn_uuid, sender);
        }
    }
fn add_sink ( & self , conn_uuid : u128 , sender : ChatSender ) { let mut mutable = self . mutable . lock ( ) ; if conn_uuid == self . session_id { // if this is our producer save it for later (shutdown) mutable . sender_producer . replace ( sender ) ; log :: debug ! ( " " self session_id ) ; } else { // otherwise, this is a producer we'll forward to log :: debug ! ( " " self session_id conn_uuid ) ; mutable . senders . insert ( conn_uuid , sender ) ; } }
add a sink, which is a producer's sender
add a sink which is a producer ' s sender
&self
conn_uuid
u128
sender
ChatSender