Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.
/ DANPromise Public archive

A threadsafe, lightweight implementation of Promises in Objective-C

License

Notifications You must be signed in to change notification settings

endocrimes/DANPromise

Repository files navigation

DANPromise

A thread-safe, lightweight implementation of promises in Objective-C.

Installation

Installation through CocoaPods is recommended, although one may use git submodules too.

pod 'DANPromise'

Usage

DANDeferredValue *deferred = [DANDeferredValue deferredValue];
DANPromise *promise = [deferred promise];
    
[promise then:^(id result) {
    NSLog(@"Completed with result: %@", result);
}];

[promise fullfill:@"Hello"];

About

A threadsafe, lightweight implementation of Promises in Objective-C

Resources

License

Stars

Watchers

Forks

Packages

No packages published