Schrodinger

master

A promise library. But you don't know if the promise will be capt.
OpenKitten/Schrodinger

Schrodinger

An extremely simple promise library.

Usage

Add a Package.swift dependency:

.Package(url: "https://github.com/OpenKitten/Schrodinger.git", majorVersion: 1)

Run code asynchronously and await their results. Supports error throwing.

let promisedResult = async {
	// Run your heavy code
	throw An.error
	
 	return successfulResults
}

try promise.await()

And set custom timeouts.

// times out after a minute
let promise = async(timingOut: .seconds(60)) {
	...
}

Description

  • Swift Tools 4.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Wed Aug 31 2022 13:15:48 GMT-0500 (GMT-05:00)