The name of this debouncer
The scheduler implementation to use; Can accept an akka scheduler a la magnet pattern
The time after which to invoke action; each time Debouncer.call is invoked, this delay is reset
The maximum time to delay the invocation of action()
The action to invoke
If false, then the first invocation of call() calls action exactly once. Subsequent calls are debounced.
Register that the provided action should be called according to the debounce logic
Highly performant generic debouncer
Note: This is not written as an Actor for performance reasons. Debounced calls are filtered synchronously, in the caller thread, without the need for locks, context switches, or heap allocations. We use AtomicBoolean to resolve concurrent races; the probability of contending on an AtomicBoolean transition is very low.