Skip to content

FileSystemWatcher.Linux: use a single inotify instance and refactor watch tracking. #117148

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d67ff45
FileSystemWatcher.Linux: use a single inotify instance and refactor w…
tmds Jun 30, 2025
3fbd374
Fix xunit test hang.
tmds Jul 1, 2025
07e86f3
csproj: try fix CI leg build failures by adding References in all non…
tmds Jul 1, 2025
3cb75b0
Don't consider ignoreFd in RemoveWatchedDirectoryFromParentAndWatches…
tmds Jul 1, 2025
4d64e82
Explain why RemoveUnusedINotifyWatches takes the watchers lock.
tmds Jul 2, 2025
2941f9f
Detect when the watchers dropped to zero in a single place.
tmds Jul 2, 2025
3d91dee
Check if watchers didn't drop to zero on every IN_IGNORED.
tmds Jul 2, 2025
41546fb
Fix and simplify how we detect when all watchers stopped.
tmds Jul 3, 2025
680c50a
Don't accept new Watchers when all watchers stopped.
tmds Jul 3, 2025
eeab032
Rename variable.
tmds Jul 3, 2025
bf5c14d
DequeueEvents: stop emitting events when we see IsStopped.
tmds Jul 3, 2025
a9ac9b3
Start the Watcher after setting enabled. Use static s_watchersLock di…
tmds Jul 7, 2025
679643d
Remove unneeded lock.
tmds Jul 7, 2025
f7be23d
Always start dequeuing events.
tmds Jul 8, 2025
8450710
Don't add child watches once the root was removed.
tmds Jul 8, 2025
78f45cb
Non-functional code changes (renames, visibility modifiers, moving co…
tmds Jul 8, 2025
042b4a1
Assign RootDirectory in AddOrUpdateWatchedDirectory.
tmds Jul 8, 2025
e3dd435
Add additional Debug.Assert Monitor.IsEntered for checking locks are …
tmds Jul 9, 2025
4df6f8e
Merge branch 'main' into inotify
tmds Jul 10, 2025
8e65598
Add some notes about the buffer/queue sizes.
tmds Jul 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ internal enum NotifyEvents
IN_ONLYDIR = 0x01000000,
IN_DONT_FOLLOW = 0x02000000,
IN_EXCL_UNLINK = 0x04000000,
IN_MASK_ADD = 0x20000000,
IN_ISDIR = 0x40000000,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@
<ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.Thread\src\System.Threading.Thread.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Concurrent\src\System.Collections.Concurrent.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.Channels\src\System.Threading.Channels.csproj" />
</ItemGroup>

</Project>
Loading
Loading