src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.ts/InlineCompletionsSession/update
class InlineCompletionsSession:	private async update(triggerKind: InlineCompletionTriggerKind): Promise<void> {
		if (!this.shouldUpdate()) {
			return;
		}

		const position = this.editor.getPosition();

		const startTime = new Date();

		const promise = createCancelablePromise(async token => {
			let result;
			try {
				result = await provideInlineCompletions(this.registry, position,
					this.editor.getModel(),
					{ triggerKind, selectedSuggestionInfo: undefined },
					token,
					this.languageConfigurationService
				);

				const endTime = new Date();
				this.debounce.update(this.editor.getModel(), endTime.getTime() - startTime.getTime());

			} catch (e) {
				onUnexpectedError(e);
				return;
			}

			if (token.isCancellationRequested) {
				return;
			}

			this.cache.setValue(
				this.editor,
				result,
				triggerKind
			);
			this.updateFilteredInlineCompletions();
			this.onDidChangeEmitter.fire();
		});
		const operation = new UpdateOperation(promise, triggerKind);
		this.updateOperation.value = operation;
		await promise;
		if (this.updateOperation.value === operation) {
			this.updateOperation.clear();
		}
	}