src/vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker.ts/NativeWorkingCopyBackupTracker/onFinalBeforeShutdown
class NativeWorkingCopyBackupTracker:	protected async onFinalBeforeShutdown(reason: ShutdownReason): Promise<boolean> {

		// Important: we are about to shutdown and handle dirty working copies
		// and backups. We do not want any pending backup ops to interfer with
		// this because there is a risk of a backup being scheduled after we have
		// acknowledged to shutdown and then might end up with partial backups
		// written to disk, or even empty backups or deletes after writes.
		// (https://github.com/microsoft/vscode/issues/138055)

		this.cancelBackupOperations();

		// For the duration of the shutdown handling, suspend backup operations
		// and only resume after we have handled backups. Similar to above, we
		// do not want to trigger backup tracking during our shutdown handling
		// but we must resume, in case of a veto afterwards.

		const { resume } = this.suspendBackupOperations();

		try {

			// Dirty working copies need treatment on shutdown
			const dirtyWorkingCopies = this.workingCopyService.dirtyWorkingCopies;
			if (dirtyWorkingCopies.length) {
				return await this.onBeforeShutdownWithDirty(reason, dirtyWorkingCopies);
			}

			// No dirty working copies
			else {
				return await this.onBeforeShutdownWithoutDirty();
			}
		} finally {
			resume();
		}
	}