mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
fix: early return on cancellation
This commit is contained in:
@@ -23,6 +23,7 @@ export function runSafeAsync<T>(runtime: RuntimeEnvironment, func: () => Thenabl
|
||||
runtime.timer.setImmediate(() => {
|
||||
if (token.isCancellationRequested) {
|
||||
resolve(cancelValue());
|
||||
return;
|
||||
}
|
||||
return func().then(result => {
|
||||
if (token.isCancellationRequested) {
|
||||
|
||||
Reference in New Issue
Block a user