src/vs/workbench/services/configuration/browser/configuration.ts/FileServiceBasedConfiguration/resolveContents
class FileServiceBasedConfiguration:	async resolveContents(): Promise<[string | undefined, [string, string | undefined][]]> {

		const resolveContents = async (resources: URI[]): Promise<(string | undefined)[]> => {
			return Promise.all(resources.map(async resource => {
				try {
					let content = (await this.fileService.readFile(resource, { atomic: true })).value.toString();

					// If file is empty and had content before then file would have been truncated by node because of parallel writes from other windows
					// To prevent such case, retry reading the file in 20ms intervals until file has content or max 5 trials or disposed.
					// https://github.com/microsoft/vscode/issues/115740 https://github.com/microsoft/vscode/issues/125970
					for (let trial = 1; !content && this.resourcesContentMap.get(resource) && !this.disposed && trial <= 5; trial++) {
						await timeout(20);
						this.logService.debug(`Retry (${trial}): Reading the configuration file`, resource.toString());
						content = (await this.fileService.readFile(resource)).value.toString();
					}

					this.resourcesContentMap.set(resource, !!content);
					if (!content) {
						this.logService.debug(`Configuration file '${resource.toString()}' is empty`);
					}
					return content;
				} catch (error) {
					this.resourcesContentMap.delete(resource);
					this.logService.trace(`Error while resolving configuration file '${resource.toString()}': ${errors.getErrorMessage(error)}`);
					if ((<FileOperationError>error).fileOperationResult !== FileOperationResult.FILE_NOT_FOUND
						&& (<FileOperationError>error).fileOperationResult !== FileOperationResult.FILE_NOT_DIRECTORY) {
						errors.onUnexpectedError(error);
					}
				}
				return '{}';
			}));
		};

		const [[settingsContent], standAloneConfigurationContents] = await Promise.all([
			resolveContents([this.settingsResource]),
			resolveContents(this.standAloneConfigurationResources.map(([, resource]) => resource)),
		]);

		return [settingsContent, standAloneConfigurationContents.map((content, index) => ([this.standAloneConfigurationResources[index][0], content]))];
	}