Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions hyperactor/src/mailbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1092,9 +1092,9 @@ impl<T: Message> Buffer<T> {
fn send(
&self,
item: (T, PortHandle<Undeliverable<T>>),
) -> Result<(), mpsc::error::SendError<(T, PortHandle<Undeliverable<T>>)>> {
) -> Result<(), Box<mpsc::error::SendError<(T, PortHandle<Undeliverable<T>>)>>> {
self.seq.fetch_add(1, Ordering::SeqCst);
self.queue.send(item)?;
self.queue.send(item).map_err(Box::new)?;
Ok(())
}
}
Expand Down Expand Up @@ -1224,9 +1224,8 @@ impl MailboxSender for MailboxClient {
return_handle: PortHandle<Undeliverable<MessageEnvelope>>,
) {
tracing::event!(target:"messages", tracing::Level::TRACE, "size"=envelope.data.len(), "sender"= %envelope.sender, "dest" = %envelope.dest.actor_id(), "port"= envelope.dest.index(), "message_type" = envelope.data.typename().unwrap_or("unknown"), "send_message");
if let Err(mpsc::error::SendError((envelope, return_handle))) =
self.buffer.send((envelope, return_handle))
{
if let Err(err) = self.buffer.send((envelope, return_handle)) {
let mpsc::error::SendError((envelope, return_handle)) = *err;
let err = DeliveryError::BrokenLink(
"failed to enqueue in MailboxClient; buffer's queue is closed".to_string(),
);
Expand Down
4 changes: 4 additions & 0 deletions hyperactor_mesh_admin_tui/bin/admin_tui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ use clap::Parser;
use hyperactor_mesh_admin_tui_lib::LangName;
use hyperactor_mesh_admin_tui_lib::ThemeName;
use hyperactor_mesh_admin_tui_lib::TuiConfig;
// tokio is the async runtime on the OSS path (#[tokio::main]);
// fbcode uses fbinit::main. Explicit use suppresses the unused-deps
// linter while keeping tokio in BUCK deps for autocargo.
use tokio as _;

/// Command-line arguments for the admin TUI.
#[derive(Debug, Parser)]
Expand Down
6 changes: 6 additions & 0 deletions hyperactor_mesh_admin_tui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@
//! buck2 run fbcode//monarch/hyperactor_mesh_admin_tui:hyperactor_mesh_admin_tui -- --addr 127.0.0.1:XXXXX
//! ```

// tokio is used extensively (tokio::spawn, tokio::time, tokio::sync)
// but the unused-deps linter does not see through fbinit's runtime
// provider. This suppresses the false positive while keeping tokio
// in BUCK deps for autocargo.
use tokio as _;

mod actions;
mod app;
pub(crate) mod client;
Expand Down
Loading