Pedestal 2.3.0 is out! The first new feature is a...
# opensavvy
c
Pedestal 2.3.0 is out! The first new feature is an experimental class:
Progressive
.
Progressive
is a holder for an intermediate value with its associated progress information. This release also adds helpers to capture progress events from flows:
Copy code
val updates: Flow<Progressive<String>> = captureProgress {
    report(loading(0.1))
    delay(1000)
    report(loading(0.5))
    delay(1000)
    "End!"
}
Output:
Copy code
null Loading(10%)
null Loading(50%)
End! Done
Of course, it comes with conversion functions to existing types
Outcome
and
ProgressiveOutcome
. The second major feature is the addition of a new module, Pedestal Weak, which provides multiplatform implementations of weak references, weak maps and associated data structures:
Copy code
val data = WeakMap<Int, String>()

data[5] = "5"
data[6] = "6"

println(data[5]) // Maybe "5", maybe 'null' if the runtime has cleared it
I have needed this many times over the past few years, including for cache implementations that can smartly purge themselves when memory is tight. It's finally here, and I'm searching for feedback 🙂 See the full changelog • Visit the documentation