Skip to content

Commit 04dd2bc

Browse files
committed
docs: for tokio::select
1 parent 810724e commit 04dd2bc

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/sig.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ pub async fn run(
186186
let mut paused = false;
187187

188188
loop {
189+
// While paused:
190+
// - Keep watching pause state changes so resume is immediate.
191+
// - Keep watching the input channel to detect EOF and terminate cleanly.
192+
// Incoming lines are intentionally dropped while paused.
189193
if paused {
190194
tokio::select! {
191195
biased;
@@ -206,6 +210,9 @@ pub async fn run(
206210
continue;
207211
}
208212

213+
// When render throttling is enabled:
214+
// - Wait for the next render tick before processing input.
215+
// - Allow pause changes to interrupt the wait so Ctrl+S stays responsive.
209216
if let Some(interval) = &mut maybe_interval {
210217
tokio::select! {
211218
biased;

0 commit comments

Comments
 (0)