Piper 1.1.1

Piper 1.1.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2016
SPMSupports SPM

Maintained by Brad Hilton.



Piper 1.1.1

  • By
  • Brad Hilton

Piper

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.