Extension to AtomicReference
that allows more idiomatic usage.
Simple backoff implementation, not exponential, grows randomly but linearly
Simple memoizer that can fail.
Simple memoizer that can fail.
WARNING it must be used with care. Note in particular that it must not always fail as it tail recurses in that case and will live lock.
Pool manages two queues of available and busy objects.
Pool manages two queues of available and busy objects.
Immutable, variable reference needs to be managed externally.
Thread-safe monotonic sequence generator
Creates a thread-safe mutable Pool wrapper
Factory for creating {{ThreadFactory}} instances.
Factory for creating {{ThreadFactory}} instances. All factory implementations produce named threads to give good stack-traces.
Extension to
AtomicReference
that allows more idiomatic usage.It adds a value that can be set with an update function:
value = (a: A) => calculate(a) value = calculate(_)