JetToTheFuture
JetToTheFuture provides safe forced()
to get to the BrightFutures.Future values on the main thread.
Its usecase is mainly for command-line scripts and testcases, not for apps because forced()
is potentially unsafe on main thread.
Usage
see testcases.
for command-line swift script:
let r = forcedFuture {methodThatReturnFuture()}
print("\(r)")
// no need to run RunLoop to wait at the end of the script
Installation
JetToTheFuture is available through CocoaPods.
pod "JetToTheFuture"
License
JetToTheFuture is available under the MIT license. See the LICENSE file for more info.