Releases: lilyball/Tomorrowland
Releases · lilyball/Tomorrowland
v0.4.3
v0.4.2
v0.4.1
v0.4.0
- Improve the behavior of
.delay(on:_:)
and.timeout(on:delay:)
when usingPromiseContext.operationQueue
. The relevant operation is now added to the queue immediately and only becomes ready once the delay/timeout has elapsed. - Add
-[TWLPromise initCancelled]
to construct a pre-cancelled promise. - Add
Promise.init(on:fulfilled:after:)
,Promise.init(on:rejected:after:)
, andPromise.init(on:result:after:)
. These initializers produce something akin toPromise(fulfilled: value).delay(after)
except they respond to cancellation immediately. This makes them more suitable for use as cancellable timers, as opposed to.delay(_:)
which is more intended for debugging (#27). - Try to clean up the callback list when calling
PromiseInvalidationToken.requestCancelOnInvalidate(_:)
. Any deallocated promises at the head of the callback list will be removed. This will help keep the callback list from growing uncontrollably when a token is used merely to cancel all promises when the owner deallocates as opposed to being periodically invalidated during its lifetime (#25). - Cancel the
.delay(_:)
timer if.requestCancel()
is invoked and the upstream promise cancelled. This way requested cancels will skip the delay, but unexpected cancels will still delay the result (#26).
v0.3.4
- Add
PromiseInvalidationToken.cancelWithoutInvalidating()
. This method cancels any associated promises without invalidating the token, thus allowing for anyonCancel
andalways
handlers on the promises to fire (#23). - Add missing
Promise
↔ObjCPromise
bridging methods for the case ofValue: AnyObject, Error == Swift.Error
(#24).
v0.3.3
v0.3.2
v0.3.1
- Add a missing Swift->ObjC convenience bridging method.
- Add
Decodable
conformance toNoError
. - Add method
Promise.fork(_:)
. - Fix compilation failure when targeting 32-bit iOS 9 simulator in Xcode 9.3.
- Fix cancellation propagation test cases on iOS 9 simulators.
v0.3.0
- Add
Promise.requestCancelOnInvalidate(_:)
as a convenience fortoken.requestCancelOnInvalidate(_:)
. - Add
Promise.requestCancelOnDeinit(_:)
as a convenience for adding a token property to an object that invalidates on deinit. - Better support for
OperationQueue
withdelay
/timeout
. Instead of using theOperationQueue
's underlying queue, we instead use a.userInitiated
queue for the timer and hop onto theOperationQueue
to resolve the promise.
v0.2.0
- Implement automatic cancellation propagation and remove the
.linkCancel
option. - Remove the
cancelOnTimeout:
parameter totimeout(on:delay:)
in favor of automatic cancellation propagation. - Automatically invalidate
PromiseInvalidationToken
s ondeinit
. This behavior can be disabled via a parameter toinit
.