Skip to main content

Module worker

Module worker 

Source
Expand description

The filesystem worker thread (ADR-0005 §1).

Owns a FileSystemService and does every blocking call on its own thread, emitting FsEvents back into the state loop. This is the half of the concurrency model that makes the synchronous trait safe: the methods block, but never on the render loop.

The worker is deliberately dumb — it reads what it is told to read and reports what it found. All the decisions (what to expand, how to reconcile a re-read) live in crate::tree::FileTree, where they are pure and unit-testable.

Structs§

FsWorker
Handle to a running worker thread. Dropping it shuts the thread down and joins it.