class

Freshen::Debouncer(T)

Inherits Reference < Object

High-performance, sliding-window event coalescing engine. Batches rapid burst notifications within a configurable sliding window bounded by a maximum deadline to prevent event starvation.

Constructors

new(window : Time::Span = 50.milliseconds, max_window : Time::Span = 250.milliseconds, &on_coalesce : Array(T) -> Nil)
Source

Instance methods

close

Shuts down the debouncer loop and closes the event channel.

Source
max_window
Source
running?
Source
trigger(item : T) : Nil

Enqueues a notification to be coalesced through the sliding debounce window.

Source
window
Source