FSWatch::Inotify
Inherits FSWatch::Backend < Reference < Object
Constants
Event masks (inotify(7)).
How often the read loop re-checks @stopped: the evented read carries a read_timeout so a stopped backend still exits promptly instead of sleeping until the next event.
Directories the descent arms between Fiber.yields: the walk must share the scheduler, but each yield is also the only point a concurrent #stop can land — the stop-check after every yield is what keeps arming from racing the fd teardown.
Constructors
Instance methods
Begin watching path (a file or a directory). With recursive
set at construction, backends extend the watch to the tree —
natively where the API allows (inotify: add a watch per
directory on create; kqueue: rescan on directory NOTE_WRITE;
poll: the tree walk is the watch).
The observation loop — runs INSIDE a fiber spawned by the core; returns when stopped. Must never block the scheduler thread: waits go through the event loop (evented IO / sleep / select).
Request teardown; must be callable from any fiber. The run loop may take a bounded moment (stop-check cadence) to actually exit.