Files
moli/moli-parkable-image/src/lib.rs
ldm0 0099465abc feat(parkable-image): add managed encoded image parking
Adopt completed image buffers, protect readers with snapshots, and park encoded bytes into one disk extent with a reusable backup. Keep resident and parked registries separate, expose owner-driven deadlines and force parking, and synchronize notifications with a short-lock waiting flag. Include lifecycle, concurrency, scheduling, and failure regressions with documentation and runnable examples.
2026-09-21 16:47:19 +08:00

21 lines
743 B
Rust

//! Parkable encoded image storage.
//!
//! Completed encoded images are decoded through read-only snapshots and may be
//! parked into one `DiskPool` extent. Reading a parked image unparks it
//! synchronously; the retained disk extent lets a later park discard memory
//! without another write. The manager keeps resident and parked registries
//! separate, owns parking sweeps, and exposes the next resident deadline to
//! its runtime. Reader release uses a short grace period before re-parking.
mod image;
mod manager;
mod policy;
mod registry;
pub use image::{ParkableImage, ParkableImageSnapshot};
pub use manager::{ParkableImageManager, ParkableImageManagerDiagnostics};
pub use policy::ParkableImagePolicy;
#[cfg(test)]
mod tests;