Skip to main content

Import

What it does

PollingHelper repeatedly calls an async function on a schedule until a stop condition is met, a limit is reached, or the caller aborts. It supports exponential and linear backoff, jitter, per-attempt timeouts, and lifecycle hooks.

Constructor

PollingOptions<T>

Instance methods

PollingResult<T>

metrics

Static methods

Factory

Returns a PollingHelper instance — useful when you want to configure once and call start() later.

Examples

Basic polling with stop condition

Exponential backoff with jitter

Abortable polling

Static shorthand

Lifecycle hooks

Use jitter in production to avoid thundering-herd problems when many clients poll the same endpoint.