KGNThread
is a collection of helpful methods that wrap Grand Central Dispatch.
github "kgn/KGNThread"
pod 'KGNThread'
Each method is called with an optional delay, and a block to execute on the thread.
Dispatch on the main thread, useful for updating the UI from a background thread.
Thread.Main {
// Do something on the main thread
}
Thread.Main(delay: 2) {
// Do something on the main thread,
// after a 2 second delay
}
Dispatch on a serial queue reserved for disk access.
Thread.Disk {
// Write to disk...
}
Dispatch on the global threads: high
, low
, default
, background
.
Thread.High {
// Do something high priority
}
Thread.Low(delay: 5) {
// Do something low priority,
// after a 5 second delay
}
- Badges
- Tests
- Travis
- Carthage
- CocoaPods
- Description
- Documentation
- AppleTV
- AppleWatch
- Prebuilt Frameworks
- Travis Test Matrix