Bugfix: fix race conditions

This commit is contained in:
2026-08-10 11:07:39 +01:00
parent 44c5c19050
commit 9eae95e391
14 changed files with 326 additions and 175 deletions
+13
View File
@@ -0,0 +1,13 @@
type SyncTask = (dirPath: string, firstRun?: boolean) => Promise<void>;
export default class SyncScheduler {
private readonly task;
private readonly debounceMs;
private pending;
private timers;
private flushing;
constructor(task: SyncTask, debounceMs: number);
schedule(dirPath: string): void;
enqueue(dirPath: string, firstRun?: boolean): void;
private flush;
}
export {};