class

Pomtex::Watcher::LivePulse

Inherits Reference < Object

Watches the document and everything it inputs, and fires a rebuild once the files have been quiet for debounce (editors often write in several steps).

inotify fiber ─┐
               ├─(changed path)──▶ [pulses] ──▶ debounce (select/timeout) ──▶ rebuild
poll fiber ────┘

inotify covers what it can; files it can't (network file systems, no inotify at all) are polled for mtime changes instead.

Constructors

new(debounce : Time::Span = Config::DEFAULT_DEBOUNCE, poll : Time::Span = Config::WATCH_POLL_PERIOD, inotify : Inotify | Nil = Inotify.open, &rebuild : -> Array(Path))

rebuild compiles and returns the set of files to watch from then on.

Source

Instance methods

debounce
Source
poll
Source