src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.ts/StoredFileWorkingCopySaveParticipant/participate
class StoredFileWorkingCopySaveParticipant:	participate(workingCopy: IStoredFileWorkingCopy<IStoredFileWorkingCopyModel>, context: { reason: SaveReason }, token: CancellationToken): Promise<void> {
		const cts = new CancellationTokenSource(token);

		return this.progressService.withProgress({
			title: localize('saveParticipants', "Saving '{0}'", workingCopy.name),
			location: ProgressLocation.Notification,
			cancellable: true,
			delay: workingCopy.isDirty() ? 3000 : 5000
		}, async progress => {

			// undoStop before participation
			workingCopy.model?.pushStackElement();

			for (const saveParticipant of this.saveParticipants) {
				if (cts.token.isCancellationRequested || workingCopy.isDisposed()) {
					break;
				}

				try {
					const promise = saveParticipant.participate(workingCopy, context, progress, cts.token);
					await raceCancellation(promise, cts.token);
				} catch (err) {
					this.logService.warn(err);
				}
			}

			// undoStop after participation
			workingCopy.model?.pushStackElement();
		}, () => {
			// user cancel
			cts.dispose(true);
		});
	}