Skip to content

Conversation

hishitetsu
Copy link
Member

@hishitetsu hishitetsu commented Jun 25, 2024

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. Opened Files ...
  2. ...

@0x5bfa
Copy link
Member

0x5bfa commented Jun 25, 2024

Could you let me know why this fixes for the future reference?

@hishitetsu
Copy link
Member Author

Drives is the "master" data and its elements may be added or removed by another thread. So we should copy it when enumerating not to be affected by changes in elements.

@0x5bfa
Copy link
Member

0x5bfa commented Jun 25, 2024

Should we implement DriveItems as BlockingCollection?

@hishitetsu
Copy link
Member Author

Should we implement DriveItems as BlockingCollection?

It doesn't make much sense in this case, because other operations are not blocked during enumeration even with BlockingCollection.

@yaira2 yaira2 merged commit 16eb4a7 into files-community:main Jun 25, 2024
@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Jun 25, 2024
@hishitetsu hishitetsu deleted the FixInvalidOperationException branch June 26, 2024 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

3 participants