Skip to main content

should_scan

Function should_scan 

Source
pub fn should_scan(
    snapshot: Option<&WorkSnapshot>,
    dirty: bool,
    now: Instant,
) -> bool
Expand description

Whether the tree should be read again.

Three reasons, and the middle one is what watching buys: nothing read yet, a tree that moved since the last read, and a read that has simply gone stale - the last being what covers everything the watcher cannot report, a commit or a stage among them.