Skip to content

Commit ebc512b

Browse files
mariusaemeta-codesync[bot]
authored andcommitted
ez: fix spelling of "MPSC" (#1824)
Summary: Pull Request resolved: #1824 Sorry this is driving me crazy. ghstack-source-id: 322824632 Reviewed By: dulinriley, shayne-fletcher Differential Revision: D85211513 fbshipit-source-id: dc4ff2e1c3938fff88c9584628e2dab6aafb75c3
1 parent 610428d commit ebc512b

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

docs/source/books/hyperactor-book/src/mailboxes/ports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ impl<M> PortReceiver<M> {
265265
pub async fn recv(&mut self) -> Result<M, MailboxError> {
266266
let mut next = self.receiver.recv().await;
267267
// To coalesce, get the last message from the queue if there are
268-
// more on the mspc queue.
268+
// more on the mpsc queue.
269269
if self.coalesce {
270270
if let Some(latest) = self.drain().pop() {
271271
next = Some(latest);

hyperactor/src/channel/net.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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());

hyperactor/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ declare_attrs! {
176176
})
177177
pub attr CHANNEL_MULTIPART: bool = true;
178178

179-
/// How often to check for full MSPC channel on NetRx.
179+
/// How often to check for full MPSC channel on NetRx.
180180
@meta(CONFIG = ConfigAttr {
181181
env_name: Some("HYPERACTOR_CHANNEL_NET_RX_BUFFER_FULL_CHECK_INTERVAL".to_string()),
182182
py_name: None,

hyperactor/src/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ declare_static_counter!(CHANNEL_CONNECTIONS, "channel.connections");
4848
declare_static_counter!(CHANNEL_CONNECTION_ERRORS, "channel.connection_errors");
4949
// Tracks the number of channel reconnection attempts
5050
declare_static_counter!(CHANNEL_RECONNECTIONS, "channel.reconnections");
51-
// Tracks the number of NetRx encountering full buffer, i.e. its mspc channel.
51+
// Tracks the number of NetRx encountering full buffer, i.e. its mpsc channel.
5252

5353
// This metric counts how often the NetRx→client mpsc channel remains full,
5454
// incrementing once per CHANNEL_NET_RX_BUFFER_FULL_CHECK_INTERVAL while blocked.

0 commit comments

Comments
 (0)