TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jul 2016 |
SPMSupports SPM | ✓ |
Maintained by Jesse Squires.
As of Swift 3.0 and proposal SE-0088, this library is no longer necessary.
Syntactic sugar for Grand Central Dispatch (GCD)
This library is Swifty wrapper around GCD. The design goals are to be small, simple, and make GCD slightly more friendly to use in Swift. For something more advanced with features like chaining, you should use Async.
Read the docs. Generated with jazzy. Hosted by GitHub Pages. More information on the gh-pages
branch.
import GrandSugarDispatch
dispatch(queue: .main) {
// perform task asynchronously on main queue
}
dispatch(queue: .utility, execution: .sync) {
// perform task *synchronously* on background utility (quality of service) queue
}
dispatch(queue: .background, execution: .delay(0.3)) {
// perform task on background queue, after a 0.3 second delay
}
There’s a suite of unit tests for GrandSugarDispatch
. Run them from Xcode by opening GrandSugarDispatch.xcodeproj
. These tests are well commented and serve as further documentation for how to use this library.
Please follow these sweet contribution guidelines.
Created and maintained by @jesse_squires.
GrandSugarDispatch
is released under an MIT License. See LICENSE
for details.
Copyright © 2016-present Jesse Squires.
Please provide attribution, it is greatly appreciated.