Latest 1.1.1
License MIT
Platforms ios 8.0, osx 10.10, requires ARC

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...


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

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


Brad Hilton, [email protected]


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": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Brad Hilton": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.1.1"
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    "source_files": [
    "requires_arc": true

Pin It on Pinterest

Share This