From c2b0fffe3d08d4819ca073c5821869b38784328d Mon Sep 17 00:00:00 2001 From: Veetaha Date: Mon, 9 Mar 2020 21:02:19 +0200 Subject: vscode-postrefactor: add achtung comment --- editors/code/src/installation/extension.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'editors/code/src/installation/extension.ts') diff --git a/editors/code/src/installation/extension.ts b/editors/code/src/installation/extension.ts index eb6acc341..87a587403 100644 --- a/editors/code/src/installation/extension.ts +++ b/editors/code/src/installation/extension.ts @@ -94,6 +94,10 @@ async function askToDownloadProperExtensionVersion(config: Config, reason = "") /** * Shutdowns the process in case of success (i.e. reloads the window) or throws an error. + * + * ACHTUNG!: this function has a crazy amount of state transitions, handling errors during + * each of them would result in a ton of code (especially accounting for cross-process + * shared mutable `globalState` access). Enforcing reentrancy for this is best-effort. */ const tryDownloadNightlyExtension = notReentrant(async function tryDownloadNightlyExtension( config: Config, -- cgit v1.2.3