Latest 1.0.1
Homepage https://github.com/jessesquires/GrandSugarDispatch
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0, requires ARC

:warning: DEPRECATED :warning:

As of Swift 3.0 and proposal SE-0088, this library is no longer necessary.

GrandSugarDispatch

Build Status Version Status license MIT codecov Platform Carthage compatible

Syntactic sugar for Grand Central Dispatch (GCD)

About

This library is Swifty wrapper around GCD. The design goals are to be small, simple, and make GCD slightly more friendly to use in Swift. For something more advanced with features like chaining, you should use Async.

Requirements

  • Xcode 7.3+
  • iOS 8.0+
  • OSX 10.10+
  • tvOS 9.0+
  • watchOS 2.0+
  • Swift 2.2

Installation

CocoaPods (recommended)

use_frameworks!

# For latest release in cocoapods
pod 'GrandSugarDispatch'

# Feeling adventurous? Get the latest on develop
pod 'GrandSugarDispatch', :git => 'https://github.com/jessesquires/GrandSugarDispatch.git', :branch => 'develop'

Carthage

github "jessesquires/GrandSugarDispatch"

Documentation

Read the docs. Generated with jazzy. Hosted by GitHub Pages. More information on the gh-pages branch.

Getting Started

import GrandSugarDispatch

Example usage

dispatch(queue: .main) {
    // perform task asynchronously on main queue
}

dispatch(queue: .utility, execution: .sync) {
    // perform task *synchronously* on background utility (quality of service) queue
}

dispatch(queue: .background, execution: .delay(0.3)) {
    // perform task on background queue, after a 0.3 second delay
}

Unit tests

There’s a suite of unit tests for GrandSugarDispatch. Run them from Xcode by opening GrandSugarDispatch.xcodeproj. These tests are well commented and serve as further documentation for how to use this library.

Contribute

Please follow these sweet contribution guidelines.

Credits

Created and maintained by @jesse_squires.

License

GrandSugarDispatch is released under an MIT License. See LICENSE for details.

Copyright © 2016-present Jesse Squires.

Please provide attribution, it is greatly appreciated.

Latest podspec

{
    "name": "GrandSugarDispatch",
    "version": "1.0.1",
    "license": "MIT",
    "summary": "Syntactic sugar for Grand Central Dispatch (GCD)",
    "homepage": "https://github.com/jessesquires/GrandSugarDispatch",
    "documentation_url": "http://www.jessesquires.com/GrandSugarDispatch/",
    "social_media_url": "https://twitter.com/jesse_squires",
    "authors": "Jesse Squires",
    "source": {
        "git": "https://github.com/jessesquires/GrandSugarDispatch.git",
        "tag": "1.0.1"
    },
    "source_files": "Sources/*.swift",
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "requires_arc": true,
    "deprecated": true
}

Pin It on Pinterest

Share This