Skip to main content

SHARED_WATCHER

Static SHARED_WATCHER 

Source
static SHARED_WATCHER: Mutex<Weak<SharedWatcher>>
Expand description

The shared watcher is kept alive by its subscriptions. It gets created on the first subscription and dropped with the last one, which frees the inotify instance while no container is watched. A failed creation is retried on the next subscription instead of being cached, and so is a watcher whose reader stopped. The server has a single runtime, which reads the events.