Harden generic installation and startup, preserve station settings and coalesce mail reads

This commit is contained in:
alberto committed 2026-10-16 21:03:18 +02:00
1 parent 3f6d35690b
commit 5358cad695
14 files changed
+398 -146

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
// Share only work currently in flight. Results are never cached here.
export class SingleFlight {
constructor(){this.pending=new Map();}
run(key,work){if(this.pending.has(key))return this.pending.get(key);const promise=Promise.resolve().then(work).finally(()=>{if(this.pending.get(key)===promise)this.pending.delete(key);});this.pending.set(key,promise);return promise;}
invalidate(key){this.pending.delete(key);}
clear(){this.pending.clear();}
}