Latest 1.1.1
Homepage https://github.com/bradhilton/Piper
License MIT
Platforms ios 8.0, osx 10.10, requires ARC
Authors

In Swift development it’s all to familiar to see nested GCD code like the following:

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)) { () -> Void in
    // Do some background work...
    dispatch_async(dispatch_get_main_queue()) { () -> Void in
        // Display results on main queue...
    }
}

Piper removes nesting and lets you chain arbitrary operations on any queue you like:

background {
  // Do some background work...
}.main {
  // Display results on main queue...
}.execute()

Installation

Piper is available through CocoaPods. To install, simply include the following lines in your podfile:

use_frameworks!
pod 'Piper'

Be sure to import the module at the top of your .swift files:

import Piper

Alternatively, clone this repo or download it as a zip and include the classes in your project.

Revision History

  • 1.0.0 – Initial Release

Author

Brad Hilton, [email protected]

License

Piper is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Piper",
    "version": "1.1.1",
    "summary": "Sequential Queue-Oriented Operations",
    "description": "Piper allows you to simplify your multi-threaded code for sequential operations.",
    "homepage": "https://github.com/bradhilton/Piper",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Brad Hilton": "[email protected]"
    },
    "source": {
        "git": "https://github.com/bradhilton/Piper.git",
        "tag": "1.1.1"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    },
    "source_files": [
        "Sources",
        "Sources/**/*.{swift,h,m}"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This