Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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"
```