0.18 round 2: refactor Disc::patch onto Pipeline + PatchSink

# Conflicts:
#	src/io/mod.rs
#	src/io/pipeline.rs
This commit is contained in:
MattJackson
2026-05-09 10:32:51 -07:00
5 changed files with 530 additions and 137 deletions
+5 -5
View File
@@ -21,11 +21,11 @@ pub mod pipeline;
pub(crate) use writeback_file::WritebackFile;
// Re-exports for the 0.18 redesign. Sweep is wired up in
// `disc/sweep.rs`; patch and mux migrate in later 0.18 slices.
// `WRITE_THROUGH_DEPTH` is patch-only and currently has no in-tree
// caller — the targeted `#[allow]` keeps the re-export visible
// without dragging the rest of the module under `dead_code`.
// Re-exports for the 0.18 redesign. Sweep + patch are both wired up
// (disc/sweep.rs, disc/patch.rs); mux migrates separately in autorip.
// `WRITE_THROUGH_DEPTH` is patch-specific and has no other in-tree
// caller — the targeted `#[allow]` keeps the re-export visible without
// dragging the rest of the module under `dead_code`.
#[allow(unused_imports)]
pub use pipeline::WRITE_THROUGH_DEPTH;
pub use pipeline::{DEFAULT_PIPELINE_DEPTH, Flow, Pipeline, Sink};
+7 -4
View File
@@ -29,10 +29,13 @@
//!
//! ## Dead-code suppression
//!
//! `WRITE_THROUGH_DEPTH` has no in-tree caller yet — patch is the
//! intended consumer (write-through depth=1) and migrates in a later
//! 0.18 slice. The constant ships now so the contract for that slice
//! is fixed; the targeted `#[allow]` is removed when patch lands.
//! Both `Disc::sweep` (`DEFAULT_PIPELINE_DEPTH`, `spawn_named`,
//! `try_send`) and `Disc::patch` (`WRITE_THROUGH_DEPTH`, `Flow::Stop`)
//! are now in-tree callers (0.18 round 2). The targeted `#[allow]`
//! markers below cover the corners of the API not exercised by either
//! call site (e.g. `Pipeline::spawn` without a name; `Flow::Stop`
//! return path from sweep's sink — sweep always consumes the producer's
//! full work-list). Drop the allows once mux migrates.
use std::io;
use std::sync::mpsc::{SyncSender, sync_channel};