| Modifier and Type | Class and Description |
|---|---|
class |
BusyTimedPauser
Similar to
BusyPauser but also supporting TimingPauser |
class |
LongPauser
A
Pauser that implements a pausing strategy with phases of busy waiting, yielding, and sleeping,
with each phase increasing in duration up to a configured limit. |
class |
TimeoutPauser
Deprecated.
|
class |
YieldingPauser
This pauser is designed for situations where short bursts of busyness are acceptable before yielding,
aiming to balance responsiveness with CPU usage.
|
| Modifier and Type | Method and Description |
|---|---|
static TimingPauser |
Pauser.balanced()
A balanced pauser which tries to be busy for short bursts but backs off when idle.
|
static TimingPauser |
Pauser.balancedUpToMillis(int millis)
A balanced pauser which tries to be busy for short bursts but backs off when idle with a limit of max back off.
|
static TimingPauser |
Pauser.sleepy()
A sleepy pauser which yields for a millisecond, then sleeps for 1 to 20 ms
|
static @NotNull TimingPauser |
Pauser.timedBusy()
Creates a
TimingPauser that keeps the thread busy but also incorporates timed waits. |
Copyright © 2024. All rights reserved.