Tomorrowland v1.3.0 Release Notes
Release Date: 2020-05-24 // almost 4 years ago-
- ๐ Add
PromiseContext.isExecutingNow
(TWLPromiseContext.isExecutingNow
in Obj-C) that returnstrue
if accessed from within a callback registered with.nowOr(_:)
and executing synchronously, orfalse
otherwise. If accessed from within a callback (orPromise.init(on:_:)
) registered with.immediate
and running synchronously, it inherits the surrounding scope'sPromiseContext.isExecutingNow
flag. This is intended to allowPromise(on: .immediate, { โฆ })
to query the surrounding scope's flag (#53). - โ Add convenience methods to Obj-C for doing then+catch together, as this is a common pattern and chaining Obj-C methods is a little awkward (#45).
- ๐ Change
Promise.timeout
's default context to.nowOr(.auto)
for theError
overload as well. - ๐ Change the behavior of
Promise.timeout(on:delay:)
when thedelay
is less than or equal to zero, thecontext
is.immediate
or.nowOr(_:)
, and the upstream promise hasn't resolved yet. Previously the timeout would occur asynchronously and the upstream promise would get a chance to race the timeout. With the new behavior the timeout occurs synchronously (#49).
- ๐ Add