diff options
| author | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
| commit | 4304b0f336ddba7b4ec6780795059ff2066d105b (patch) | |
| tree | 10edea744a1c2bf3fc363b4dc7f64abac8b1a0d3 /src/watch/scheduler.rs | |
| parent | e757979f1a2afdbe7146066345bb9acd19d3b151 (diff) | |
| download | aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.tar.gz aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.zip | |
comments: keep only what the code cannot show
Stripped every comment that described what an item does, documented its
arguments or fields, or cited the design docs (§n, I-n, m-n, decision n).
2247 comments down to 83.
What survives: the section dividers that segment the large modules, the
secret-handling warnings, the agent wire-frame directions, and the few notes
without which the code they attach to reads as redundant, reorderable, or
unsound.
Diffstat (limited to 'src/watch/scheduler.rs')
| -rw-r--r-- | src/watch/scheduler.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/watch/scheduler.rs b/src/watch/scheduler.rs index 837a51a..eb79db0 100644 --- a/src/watch/scheduler.rs +++ b/src/watch/scheduler.rs @@ -6,7 +6,6 @@ use crate::config::Config; use crate::db::{self, Db}; use crate::watch::detect::check_pkgbase; -/// Spawn the watcher tick thread. pub fn spawn_scheduler(cfg: Arc<Config>, db: Db, stop: Arc<AtomicBool>) -> JoinHandle<()> { std::thread::Builder::new() .name("watcher".into()) @@ -14,7 +13,6 @@ pub fn spawn_scheduler(cfg: Arc<Config>, db: Db, stop: Arc<AtomicBool>) -> JoinH while !stop.load(Ordering::SeqCst) { let tick = crate::db::setting_i64(&db, "poll_tick", 30); sweep(&cfg, &db); - // Sleep in small slices so shutdown is prompt. let mut slept = 0; while slept < tick && !stop.load(Ordering::SeqCst) { std::thread::sleep(std::time::Duration::from_secs(1)); @@ -25,7 +23,6 @@ pub fn spawn_scheduler(cfg: Arc<Config>, db: Db, stop: Arc<AtomicBool>) -> JoinH .expect("spawn watcher") } -/// One sweep over everything that is due. pub fn sweep(cfg: &Config, db: &Db) -> usize { let now = crate::time::now(); let due = match db::due_subscriptions(db, &now) { |
