CSThrottler

constructor(parent: CSHasRegistrations, dispatcher: CoroutineContext = Main, action: suspend (T) -> Unit, after: Duration = ZERO)

Parameters

parent

A scope wrapper (CSHasRegistrations) that controls the lifecycle of this throttler.

dispatcher

The CoroutineContext where the action will run (default: Main).

action

The actual work to perform (suspend function).

after

The "cooldown" or "grouping" window duration.

Type Parameters

T

The type of data passed to the action.