- The implementation of
mapError
now explicitly usesImmediateExecutionContext
, fixing unnecessary asynchronicity - Adds
delay(interval: NSTimeInterval)
onAsync
, which produces a newAsync
that completes with the original Async after the given delay - All FutureUtils free functions are now functions in extensions of the appropriate types (e.g. SequenceType)
InvalidationToken
instances now have avalidContext
property which is anExecutionContext
that can be passed to any function that accepts anExecutionContext
to make the effect of that function depend on the validity of the token.- Added support for
NSOperationQueue
as anExecutionContext
- Adds an implementation of
flatMap
that allows a function to be passed in immediately. Thanks @nghialv!
This release is compatible with Swift 2. It is a direct port of 2.0, meaning it makes no use of new Swift 2 features yet.
- Removed our homegrown 'ErrorType' with Swift 2's native one
- The 'Box' dependency is gone. Swift 2 removed the need for boxing associated values in enums!
Because antitypical/Result has not yet released a Swift 2 compatible release on CocoaPods, this version of BrightFutures can not yet be built using CocoaPods.
-
Replaced homegrown
Result
andBox
types with Rob Rix' excellent types. -
Futures & Promises are now also parametrizable by their error type, in addition to their value type:
Future<ValueType, ErrorType>
. This allows you to use your own (Swifty) error type, instead ofNSError
! -
Adds
BrightFuturesError
enum, containing all three possible errors that BrightFutures can return -
Renames
asType
toforceType
to indicate that it is a dangerous operation -
Adds missing documentation (jazzy reports 100% documentation coverage!)
-
Adds a lot of tests (test coverage is now at 97%, according to SwiftCov!)
- Updated README to reflect the pre-1.0.0 change from FutureUtils functions to free functions
- The FutureUtils class has been removed in favor of a collection of free functions. This allows for a nicer function type signature (e.g. accepting all sequences instead of just arrays)
Note: The overview for this release is incomplete
- Changed
ExecutionContext
from a protocol to a function type. This allows for better composition. It does mean that a Queue cannot be used directly as anExecutionContext
, instead use thecontext
property (e.g.Queue.main.context
) or thetoContext
function (e.g.toContext(Queue.main)
).
Note: this overview is incomplete
TaskResultValueWrapper
has been renamed to the conventional nameBox
TaskResult
has been renamed to the conventional nameResult
This release marks the state of the project before this changelog was kept up to date.