Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: protect access to isClosed with mutex #454

Merged
merged 1 commit into from Jul 21, 2022

Conversation

rfratto
Copy link
Contributor

@rfratto rfratto commented Jun 1, 2022

isClosed may be read and modified concurrently on Windows if the Watcher is closed at the same time as a new entry being added. This change protects isClosed to prevent race conditions.

The order of fields for the Windows Watcher have been rearranged to group fields protected by the mutex together to make it easier for reviewers to understand at a glance which fields are expected to be accessed through the mutex.

isClosed may be read and modified concurrently if the Windows Watcher is
closed at the same time as a new entry being added. This change protects
isClosed to prevent race conditions.

The order of fields for the Windows Watcher have been rearranged to
group fields protected by the mutex together.
@arp242 arp242 merged commit 5acfdc1 into fsnotify:main Jul 21, 2022
@arp242 arp242 mentioned this pull request Jul 21, 2022
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.

None yet

2 participants