mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 14:31:31 +01:00
Adds cancellation to md diagnostic computer (#149122)
This tracks inflight diagnostic computation and tries to cancel them if a new request comes in for the same document (usually because the document has changed or has been closed)
This commit is contained in:
@@ -25,6 +25,10 @@ export class Delayer<T> {
|
||||
this.task = null;
|
||||
}
|
||||
|
||||
dispose() {
|
||||
this.cancelTimeout();
|
||||
}
|
||||
|
||||
public trigger(task: ITask<T>, delay: number = this.defaultDelay): Promise<T | null> {
|
||||
this.task = task;
|
||||
if (delay >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user