Tomorrowland v1.0.0 Release Notes
Release Date: 2019-05-19 // almost 5 years ago-
- 🛠 Fix a rather serious bug where
PromiseInvalidationToken
s would not deinit as long as any promise whose callback was tied to the token was still unresolved. This meant that the defaultinvalidateOnDeinit
behavior would not trigger and the callback would still fire even though there were no more external references to the token, and this meant any promises configured to be cancelled when the promise invalidated would not cancel. Tokens used purely forrequestCancelOnInvalidate(_:)
would still deallocate, and tokens would still deallocate after any associated promises had resolved. - Tweak the atomic memory ordering used in
PromiseInvalidationToken
s. After a careful re-reading I don't believe I was issuing the correct fences previously, making it possible for tokens whose associated promise callbacks were executing concurrently with a call torequestCancelOnInvalidate(_:)
to read the wrong generation value, and for tokens that hadrequestCancelOnInvalidate(_:)
invoked concurrently on multiple threads to corrupt the generation. - ➕ Add
PromiseInvalidationToken.chainInvalidation(from:)
to invalidate a token whenever another token invalidates. This allows for building a tree of tokens in order to have both fine-grained and bulk invalidation at the same time. Tokens chained together this way stay chained forever (#43). - ⚡️ Update project file to Swift 5.0. The source already supported this. This change should only affect people using [Carthage][] or anyone adding building this framework from source.
- ⚡️ Update the podspec to list both Swift 4.2 and Swift 5.0. With CocoaPods 1.7.0 or later your
Podfile
can now declare which version of Swift it's compatible with. For anyone using CocoaPods 1.6 or earlier it will default to Swift 5.0.
- 🛠 Fix a rather serious bug where