Skip to content

Commit 576d22f

Browse files
NathanFlurryclaude
andcommitted
feat: US-071 - Add bounded IPC channels with backpressure
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f6ab995 commit 576d22f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/v8-runtime/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ fn main() {
376376
let writer_stream = stream.try_clone().expect("failed to clone UDS stream");
377377
set_cloexec(writer_stream.as_raw_fd())
378378
.expect("failed to set CLOEXEC on cloned stream");
379-
let (ipc_tx, ipc_rx) = crossbeam_channel::unbounded::<Vec<u8>>();
379+
let (ipc_tx, ipc_rx) = crossbeam_channel::bounded::<Vec<u8>>(1024);
380380
let call_id_router: CallIdRouter = Arc::new(Mutex::new(HashMap::new()));
381381

382382
// Spawn dedicated writer thread — only this thread writes to the socket

crates/v8-runtime/src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl SessionManager {
9090
return Err(format!("session {} already exists", session_id));
9191
}
9292

93-
let (tx, rx) = crossbeam_channel::unbounded();
93+
let (tx, rx) = crossbeam_channel::bounded(256);
9494
let slot_control = Arc::clone(&self.slot_control);
9595
let max = self.max_concurrency;
9696
let ipc_tx = self.ipc_tx.clone();

0 commit comments

Comments
 (0)