]> go.fuhry.dev Git - fsnotify.git/commit
windows: protect access to isClosed with mutex (#454)
authorRobert Fratto <robertfratto@gmail.com>
Thu, 21 Jul 2022 03:06:40 +0000 (23:06 -0400)
committerGitHub <noreply@github.com>
Thu, 21 Jul 2022 03:06:40 +0000 (05:06 +0200)
commit5acfdc196a28e905f69348ba0b5c50714492ba26
tree3137c053c4c74e7e28aa363fec922751a052469d
parentc56cafdbd7e21444af10659cc2881f800b81d7ad
windows: protect access to isClosed with mutex (#454)

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.
windows.go