Improve file access concurrency issues #139
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this PR intends to tackle some concurrency issues in Win
The issue with Win is that the file cannot be deleted if another handle to it exists. This can be the case for us if the partner is checking if the file (still) exists. In this case it would crash.
I improved this situation by adding an index to the files such that the file names are "unique" and less concurrency issues occur (sometimes can still happen since I explicitly use some files for synchronization)
I had this idea in the past already to have a buffer of files to not block the caller aka make the comm more async.
Furthermore this can be very useful in the future if we want to keep the files (sort of as a history) for debugging