Kommander is a Swift library to manage the task execution in different threads. Through the definition a simple but powerful concept, Kommand.
Inspired on the Java library Kommander from Wokdsem.
? Features
- [x] Make kommand or multiple kommands
- [x] Execute kommand or multiple kommands
- [x] Cancel kommand or multiple kommands
- [x] Retry kommand or multiple kommands
- [x] Set kommand success closure
- [x] Set kommand error closure
- [x] Set kommand error closure specifying Error type
- [x] Main thread dispatcher
- [x] Current thread dispatcher
- [x] Custom OperationQueue dispatcher
- [x] Execute single or multiple Operation
- [x] Execute sequential or concurrent closures
- [x] Execute DispatchWorkItem
- [x] Kommand state
- [x] iOS compatible
- [x] watchOS compatible
- [x] tvOS compatible
- [x] macOS compatible
- [x] Swift 4 version
- [x] Swift 3 version
- [x] Swift 2 version
- [x] Objective-C version
? Installation
Kommander is available through CocoaPods. To install
it, simply add the following line to your Podfile:
For Swift 3 compatibility use:
For Swift 2 compatibility use:
For Objective-C compatibility use:
Or you can install it with Carthage:
Or install it with Swift Package Manager:
? Usage
Making, executing, cancelling and retrying Kommands:
Specify Error type:
Retry after cancellation:
Retry after failure:
Creating Kommanders:
Shortcuts:
Creating Dispatchers:
Shortcuts:
❤️ Etc.
- Contributions are very welcome.
- Attribution is appreciated (let's spread the word!), but not mandatory.
?? Authors
alexruperez, alejandro.ruperez@intelygenz.com
juantrias, juan.trias@intelygenz.com
RobertoEstrada, roberto.estrada@intelygenz.com
?♂️ License
Kommander is available under the MIT license. See the LICENSE file for more info.