Bugfix: fix race conditions
This commit is contained in:
Vendored
+13
@@ -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 {};
|
||||
Reference in New Issue
Block a user