Skip to content

Releases: lilyball/Tomorrowland

v0.4.3

29 Jan 05:15
Compare
Choose a tag to compare
  • Fix compatibility with Xcode 10.2 / Swift 5 compiler (#31, SR-9753).

v0.4.2

23 Jan 08:32
Compare
Choose a tag to compare
  • Add new method Promise.Resolver.resolve(with: somePromise) that resolves the receiver using another promise (#30).

v0.4.1

18 Dec 05:20
Compare
Choose a tag to compare
  • Mark PromiseCancellable.requestCancel() as public (#29).

v0.4.0

27 Nov 07:43
Compare
Choose a tag to compare
  • Improve the behavior of .delay(on:_:) and .timeout(on:delay:) when using PromiseContext.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:), and Promise.init(on:result:after:). These initializers produce something akin to Promise(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

15 Nov 02:29
Compare
Choose a tag to compare
  • Add PromiseInvalidationToken.cancelWithoutInvalidating(). This method cancels any associated promises without invalidating the token, thus allowing for any onCancel and always handlers on the promises to fire (#23).
  • Add missing PromiseObjCPromise bridging methods for the case of Value: AnyObject, Error == Swift.Error (#24).

v0.3.3

26 Jun 07:09
Compare
Choose a tag to compare
  • Add initializer Promise.init(result:) for creating a Promise from a PromiseResult.
  • Fix cancellation propagation issue with when(resolved: …, cancelOnFailure: true) and when(first: …, cancelRemaining: true) (#20).
  • Update some documentation.
  • Enable APPLICATION_EXTENSION_API_ONLY.

v0.3.2

16 May 18:45
Compare
Choose a tag to compare
  • Add Hashable / Equatable conformance to PromiseInvalidationToken.
  • Add a new type TokenPromise that wraps a Promise and automatically applies a PromiseInvalidationToken. This API is Swift-only.

v0.3.1

07 Apr 03:25
Compare
Choose a tag to compare
  • Add a missing Swift->ObjC convenience bridging method.
  • Add Decodable conformance to NoError.
  • 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

05 Feb 00:15
Compare
Choose a tag to compare
  • Add Promise.requestCancelOnInvalidate(_:) as a convenience for token.requestCancelOnInvalidate(_:).
  • Add Promise.requestCancelOnDeinit(_:) as a convenience for adding a token property to an object that invalidates on deinit.
  • Better support for OperationQueue with delay/timeout. Instead of using the OperationQueue's underlying queue, we instead use a .userInitiated queue for the timer and hop onto the OperationQueue to resolve the promise.

v0.2.0

24 Jan 03:53
Compare
Choose a tag to compare
  • Implement automatic cancellation propagation and remove the .linkCancel option.
  • Remove the cancelOnTimeout: parameter to timeout(on:delay:) in favor of automatic cancellation propagation.
  • Automatically invalidate PromiseInvalidationTokens on deinit. This behavior can be disabled via a parameter to init.