Releases: spider-gazelle/promise
v3.2.0: fix: deprecation warnings
v3.1.0
v3.0.0
fixes issue where you couldn't do Promise.all or Promise.any where the promise types / return values differed.
See #2
Breaking change as now the Promise class has a generic type.
So you can no longer do something like promises = [] of Promise
and instead need to do promises = [] of Promise(String)
etc
v2.2.3: feat: remove tasker dependency
improve promise timeouts
v2.2.2
v2.2.1
v2.1.0: feat: add supports for timeouts
add support for timeouts (no overhead if they are not used)
v2.0.1: feat: use generic classes to interpret the promise types
The previous version required that promise values were nilable.
i.e. Promise.new(String) == Promise::DeferredPromise(String?)
This is no longer the case
Promise.new(String) == Promise::DeferredPromise(String)
This was achieved by:
- Using generic classes to isolate the return value types of promise callbacks
- Using macros to differentiate between promise and regular return values without creating a union type
- Detecting
NoReturn
where a callback always raises and creating aPromise::DeferredPromise(Nil)
for this case
Otherwise the library functions exactly as before.
v2.0.0
The previous version required that promise values were nilable.
i.e. Promise.new(String) == Promise::DeferredPromise(String?)
This is no longer the case
Promise.new(String) == Promise::DeferredPromise(String)
This was achieved by:
- Using a proc to isolate the return value of the promise callbacks
- Using macros to differentiate between promise and regular return values without creating a union type
- Detecting
NoReturn
where a callback always raises and creating aPromise::DeferredPromise(Nil)
for this case
Otherwise the library functions exactly as before.