This commit is contained in:
Johannes Rieken
2020-01-30 10:56:49 +01:00
parent f31b3de90d
commit abaabc8245

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IdleValue } from 'vs/base/common/async';
import { IdleValue, raceCancellation } from 'vs/base/common/async';
import { CancellationTokenSource, CancellationToken } from 'vs/base/common/cancellation';
import * as strings from 'vs/base/common/strings';
import { IActiveCodeEditor } from 'vs/editor/browser/editorBrowser';
@@ -391,7 +391,8 @@ export class SaveParticipant implements ISaveParticipant {
break;
}
try {
await p.participate(model, env, progress, cts.token);
const promise = p.participate(model, env, progress, cts.token);
await raceCancellation(promise, cts.token);
} catch (err) {
this._logService.warn(err);
}