Skip to content

Conversation

@Szczyrk
Copy link
Collaborator

@Szczyrk Szczyrk commented Aug 24, 2021

No description provided.

@Szczyrk Szczyrk changed the base branch from dev/v3.17.x.x to experimental/improved-download-unpacking-installation August 27, 2021 12:05
#endif
FileOperations.Move(sourceFile.FullHashPath, destinationFilePath, cancellationToken);
_localMetaData.RegisterEntry(sourceFile.Name, _versionId, sourceFile.Size, isLastEntry);
while (true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please try to modify this code so it uses semaphores - https://docs.microsoft.com/en-us/dotnet/api/system.threading.semaphore?view=net-5.0

}
}
});
_localMetaData.RegisterEntry(sourceFile.Name, _versionId, sourceFile.Size, isLastEntry);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be done on thread as well since we cannot assume that thread succeeds and register the entry before it's indeed installed.

if (mapHashExtractedFiles.TryGetHash(filePath, out nameHash))
{
var sourceFile = new SourceFile(filePath, packageDir.Path, usedSuffix, nameHash, _versionContentSummary.Size);
var sourceFile = new SourceFile(filePath, packageDir.Path, usedSuffix, nameHash, _versionContentSummary.Files[i].Size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change related to the thread pool support?

If not please move it to another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants