mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-11 16:33:01 -06:00
Disk cache: apply the free-space reading where it's taken, evict off the UI thread at open (#2551)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
74ea0be88f
commit
8ab492d8cd
@@ -44,8 +44,9 @@ impl<T> Default for Watch<T> {
|
||||
|
||||
/// The system's memory ([`memory`]).
|
||||
pub type MemoryWatch = Watch<SysMemory>;
|
||||
/// The disk cache's disk: `(total, available)` bytes ([`disk_space`]).
|
||||
pub type DiskWatch = Watch<(u64, u64)>;
|
||||
/// The disk cache's free-space reading ([`disk_space`]): the reader applies it to its cache
|
||||
/// itself, so only the busy guard is used.
|
||||
pub type DiskWatch = Watch<()>;
|
||||
|
||||
impl<T: Copy + Send + 'static> Watch<T> {
|
||||
/// Start a new reading in the background on a thread called `name` (no threads on the web:
|
||||
|
||||
Reference in New Issue
Block a user