Skip to content

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

Notifications You must be signed in to change notification settings

reaumur/Schrodinger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)) {
	...
}

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%