Latest 1.0
Homepage https://github.com/kgn/KGNThread
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation
Authors

KGNThread is a collection of helpful methods that wrap Grand Central Dispatch.

[iOS 8.0+]()
[watchOS 1.0+]()
[Xcode 7.1]()
[Swift 2.0]()
Release
Build Status

Build Status
[Test Coverage]()
Carthage Compatible
CocoaPods Version
CocoaPods Platforms

Twitter
Star
Star

Installing

Carthage

github "kgn/KGNThread"

CocoaPods

pod 'KGNThread'

Examples

Each method is called with an optional delay, and a block to execute on the thread.

Main

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
}

Disk

Dispatch on a serial queue reserved for disk access.

Thread.Disk {
    // Write to disk...
}

Global

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
}

Progress

  • [X] Badges
  • [X] Tests
  • [X] Travis
  • [X] Carthage
  • [X] CocoaPods
  • [X] Description
  • [X] Documentation

Latest podspec

{
    "name": "KGNThread",
    "version": "1.0",
    "authors": {
        "David Keegan": "[email protected]"
    },
    "homepage": "https://github.com/kgn/KGNThread",
    "summary": "A collection of helpful methods that wrap GCD.",
    "source": {
        "git": "https://github.com/kgn/KGNThread.git",
        "tag": "v1.0"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "frameworks": "Foundation",
    "source_files": "Source/Thread.swift"
}

Pin It on Pinterest

Share This