CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Jan 2016 |
| SPMSupports SPM | ✗ |
Maintained by David Keegan.
KGNThread is a collection of helpful methods that wrap Grand Central Dispatch.
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
}