Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhurray/swiftydispatch
Lightweight syntax wrapper over GCD
https://github.com/jhurray/swiftydispatch
Last synced: 17 days ago
JSON representation
Lightweight syntax wrapper over GCD
- Host: GitHub
- URL: https://github.com/jhurray/swiftydispatch
- Owner: jhurray
- License: mit
- Created: 2016-05-03T05:09:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-05-04T02:23:41.000Z (over 8 years ago)
- Last Synced: 2023-08-09T08:44:10.025Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftyDispatch
Lightweight syntax wrapper over GCD dispatch queues and dispatch groups```swift
var main = DispatchQueue(type: .Main)main.sync {
print("sync")
}let queue = DispatchQueue(type: .Custom(name: "my.queue", style: .Serial))
queue.async({
print("async")
})let group = DispatchGroup()
for i in 0...5 {
group.async(queue, execute: {
print("\(i)")
})
}group.enter()
group.async(queue, execute: {
group.leave()
})group.notify(queue, execute: {
print("done")
})```
##Carthage
Add the following to your cartfile
```
github "jhurray/SwiftyDispatch"
```