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.
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
JetToTheFuture is available through CocoaPods.
pod "JetToTheFuture"
JetToTheFuture is available under the MIT license. See the LICENSE file for more info.