Commit Graph
12 Commits
Author SHA1 Message Date
T. R. Bernstein d2abc3355e Keep every event by default
Events were buffered with `bufferingNewest(512)`, so a burst of
changes silently lost all but the newest 512 events whenever the
consumer lagged. The stream now buffers without limit, and
`init(bufferingPolicy:)` lets callers choose a bounded policy.
2026-09-13 23:00:13 +02:00
T. R. Bernstein dcc08eb928 Cancel the event reader before closing the descriptor
`deinit` closed the inotify descriptor while its dispatch source was
still active. The kernel drops the epoll registration on close, but
libdispatch keeps its own; an instance created afterwards that reuses
the descriptor number could inherit that stale state and never
receive events. Roughly one test run in three lost a single event
this way.

The reader is now cancelled in `deinit` and the descriptor closed in
its cancel handler, as libdispatch requires.
2026-09-13 22:59:15 +02:00
T. R. Bernstein 134e4e152d Implement watch exclusion lists
Docs / deploy (push) Has been cancelled
Docs / docs (push) Has been cancelled
Allow exclusion of directories when watching recursively.
2026-03-15 22:46:59 +01:00
T. R. Bernstein 76f91f67a6 Add integration tests for inofity limits
inotify exposes a /proc interface to limit kernel memory usage. If those
limits are set too low, inotify cannot add all watches. The integration
test verifies, that Inotify yields an error in that case.
2026-03-12 14:52:33 +01:00
T. R. Bernstein ffac6d17a5 Implement auto subtree watching of a directory
Allow recursively watching a directory while adding newly created
subdirectories to the inotify watch list.
2026-03-12 12:04:08 +01:00
T. R. Bernstein b41b82bd0f Implement recursive watching of a directory 2026-03-12 10:36:12 +01:00
T. R. Bernstein e44e1fc9b8 Adapt inotify timeouts in Tests
Inotify event stream is dependent on system usage. Increasing the
timeouts helps not having to repeat the integration tests.
2026-03-12 00:22:22 +01:00
T. R. Bernstein 58a05e9b61 Implement async event streaming 2026-03-12 00:22:17 +01:00
T. R. Bernstein 5247d898cd Implement unwatching a path 2026-03-11 18:42:19 +01:00
T. R. Bernstein 564c409c15 Implement watching a path
Each inotify instance produces events for paths in its watch list. Each
item in the watch list is identified by its watch descriptor. Different
paths can be watched for different events.
2026-03-11 18:42:12 +01:00
T. R. Bernstein 098339f9d1 Implement init/deinit of inotify system
Use RAII to handle inotify resource lifetime, i.e. initialize with actor
creation and deinitialize with actor deletion.
2026-03-11 17:50:17 +01:00
T. R. Bernstein 1a7e5ca5de Scaffold project structure 2026-03-11 16:10:48 +01:00