From e5a4fe89b7038d20eccbb33ba1c5ca4395a83354 Mon Sep 17 00:00:00 2001 From: letur Date: Sat, 12 Sep 2026 22:46:52 +0200 Subject: [PATCH] docs(core): say plainly that the session helper still blocks the runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The helper's doc comment claimed that moving `Command::output` into a sync function kept the blocking work out of the async test body. It does not: the async test calls it directly, so the calls still hold the thread they run on. State the real reason it is harmless — it runs before anything else is spawned on the runtime — so nobody reads sync-helper extraction as a way to make a blocking call executor-safe. Claude-Session: https://claude.ai/code/session_01XbWHWf9GrjXWsQ7UmcjtRy --- tests/program_pane_exit.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/program_pane_exit.rs b/tests/program_pane_exit.rs index 253b4916..802206dd 100644 --- a/tests/program_pane_exit.rs +++ b/tests/program_pane_exit.rs @@ -58,9 +58,12 @@ fn cleanup() { .output(); } -/// Starts the session with **`remain-on-exit on`** (see the note at the top), -/// kept out of the async test body: a blocking `Command::output` call written -/// directly in an `async fn` blocks the executor thread it runs on. +/// Starts the session with **`remain-on-exit on`** (see the note at the top). +/// +/// Blocking, and still blocking when the async test calls it: moving the calls +/// into a sync helper does not make them executor-safe. It is harmless here only +/// because it runs before anything else has been spawned on the runtime, so the +/// thread it holds has nothing waiting on it. fn start_session(dir: &std::path::Path) -> std::process::Output { let started = Command::new("tmux") .args([