@@ -445,7 +445,7 @@ impl<'a, M: RemoteMessage> Unacked<'a, M> {
445445 // message.0 <= largest could happen in the following scenario:
446446 //
447447 // 1. NetTx sent seq=2 and seq=3.
448- // 2. NetRx received messages and put them on its mspc channel.
448+ // 2. NetRx received messages and put them on its mpsc channel.
449449 // But before NetRx acked, the connection was broken.
450450 // 3. NetTx reconnected. In this case, NetTx will put unacked
451451 // messages, i.e. 2 and 3, back to outbox.
@@ -1062,7 +1062,7 @@ impl<M: RemoteMessage> NetTx<M> {
10621062 }
10631063 }
10641064 // UnboundedReceiver::recv() is cancel safe.
1065- // Only checking mspc channel when outbox is empty. In this way, we prioritize
1065+ // Only checking mpsc channel when outbox is empty. In this way, we prioritize
10661066 // sending messages already in outbox.
10671067 work_result = receiver. recv( ) , if outbox. is_empty( ) => {
10681068 match work_result {
@@ -1591,7 +1591,7 @@ impl<S: AsyncRead + AsyncWrite + Send + 'static + Unpin> ServerConn<S> {
15911591 Ok ( ( ) ) => {
15921592 // In channel's contract, "delivered" means the message
15931593 // is sent to the NetRx object. Therefore, we could bump
1594- // `next_seq` as far as the message is put on the mspc
1594+ // `next_seq` as far as the message is put on the mpsc
15951595 // channel.
15961596 //
15971597 // Note that when/how the messages in NetRx are processed
@@ -1601,7 +1601,7 @@ impl<S: AsyncRead + AsyncWrite + Send + 'static + Unpin> ServerConn<S> {
16011601 next. seq = seq+1 ;
16021602 }
16031603 Err ( err) => {
1604- break ( next, Err :: <( ) , anyhow:: Error >( err) . context( format!( "{log_id}: relaying message to mspc channel" ) ) , false )
1604+ break ( next, Err :: <( ) , anyhow:: Error >( err) . context( format!( "{log_id}: relaying message to mpsc channel" ) ) , false )
16051605 }
16061606 }
16071607 } ,
@@ -1700,7 +1700,7 @@ impl<S: AsyncRead + AsyncWrite + Send + 'static + Unpin> ServerConn<S> {
17001700 ( final_next, final_result)
17011701 }
17021702
1703- // NetRx's buffer, i.e. the mspc channel between NetRx and its
1703+ // NetRx's buffer, i.e. the mpsc channel between NetRx and its
17041704 // client, should rarely be full for long. But when it is full, it
17051705 // will block NetRx from taking more messages, sending back ack,
17061706 // and subsequently lead to uncommon behaviors such as ack
@@ -1733,7 +1733,7 @@ impl<S: AsyncRead + AsyncWrite + Send + 'static + Unpin> ServerConn<S> {
17331733 // Full buffer should happen rarely. So we also add a log
17341734 // here to make debugging easy.
17351735 tracing:: debug!(
1736- "{log_id}: encountered full mspc channel for {} secs" ,
1736+ "{log_id}: encountered full mpsc channel for {} secs" ,
17371737 start. elapsed( ) . as_secs( ) ,
17381738 ) ;
17391739 }
@@ -3362,7 +3362,7 @@ mod tests {
33623362 drop ( reader) ;
33633363 drop ( writer) ;
33643364 handle. await . unwrap ( ) . unwrap ( ) ;
3365- // mspc is closed too and there should be no unread message left.
3365+ // mpsc is closed too and there should be no unread message left.
33663366 assert_eq ! ( rx. recv( ) . await , Some ( 103 ) ) ;
33673367 assert_eq ! ( rx. recv( ) . await , None ) ;
33683368 } ;
@@ -3401,7 +3401,7 @@ mod tests {
34013401
34023402 cancel_token. cancel ( ) ;
34033403 handle. await . unwrap ( ) . unwrap ( ) ;
3404- // mspc is closed too and there should be no unread message left.
3404+ // mpsc is closed too and there should be no unread message left.
34053405 assert ! ( rx. recv( ) . await . is_none( ) ) ;
34063406 // No more acks from server.
34073407 assert ! ( reader. next( ) . await . unwrap( ) . is_none( ) ) ;
@@ -3435,7 +3435,7 @@ mod tests {
34353435
34363436 cancel_token. cancel ( ) ;
34373437 handle. await . unwrap ( ) . unwrap ( ) ;
3438- // mspc is closed too and there should be no unread message left.
3438+ // mpsc is closed too and there should be no unread message left.
34393439 assert ! ( rx. recv( ) . await . is_none( ) ) ;
34403440 // No more acks from server.
34413441 assert ! ( reader. next( ) . await . unwrap( ) . is_none( ) ) ;
0 commit comments