Skip to content

Commit c2b0fff

Browse files
author
Veetaha
committed
vscode-postrefactor: add achtung comment
1 parent abee777 commit c2b0fff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

editors/code/src/installation/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ async function askToDownloadProperExtensionVersion(config: Config, reason = "")
9494

9595
/**
9696
* Shutdowns the process in case of success (i.e. reloads the window) or throws an error.
97+
*
98+
* ACHTUNG!: this function has a crazy amount of state transitions, handling errors during
99+
* each of them would result in a ton of code (especially accounting for cross-process
100+
* shared mutable `globalState` access). Enforcing reentrancy for this is best-effort.
97101
*/
98102
const tryDownloadNightlyExtension = notReentrant(async function tryDownloadNightlyExtension(
99103
config: Config,

0 commit comments

Comments
 (0)