extensions/markdown-language-features/src/languageFeatures/diagnostics.ts/InflightDiagnosticRequests/trigger
class InflightDiagnosticRequests:	public async trigger(resource: vscode.Uri, compute: (token: vscode.CancellationToken) => Promise<void>): Promise<void> {
		this.cancel(resource);

		const cts = new vscode.CancellationTokenSource();
		const entry = { cts };
		this.inFlightRequests.set(resource, entry);

		try {
			return await compute(cts.token);
		} finally {
			if (this.inFlightRequests.get(resource) === entry) {
				this.inFlightRequests.delete(resource);
			}
			cts.dispose();
		}
	}