Latest 1.4.0
Homepage https://github.com/Meniny/EasyGCD
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0
Frameworks Foundation
Authors

EasyGCD

VersionAuthorBuild PassingSwift
PlatformsMIT
CocoapodsCarthageSPM

What’s this?

EasyGCD is a tiny library to make using GCD easier. written in Swift.

Requirements

  • iOS 8.0+
  • macOS 10.10+
  • watchOS 2.0+
  • tvOS 9.0+
  • Xcode 8 with Swift 3

Installation

CocoaPods

pod 'EasyGCD'

Contribution

You are welcome to fork and submit pull requests.

License

EasyGCD is open-sourced software, licensed under the MIT license.

Usage

dispatch {
  // asynchronously on the main queue
}

main {
  // asynchronously on the main queue
}

global {
  // asynchronously on the global queue
}
import EasyGCD

func sync() {
    EasyGCD.sync(.global(qos: .background)) {
        print("sync @ background global queue")
    }
}

func async() {
    EasyGCD.async(EasyGCDQueue.global(.background)) {
        print("async @ background global queue")
    }
    EasyGCD.async {
        print("async @ main queue")
    }
}

func after() {
    EasyGCD.after(2.0) {
        print("2 seconds later")
    }
    EasyGCD.after(4, queue: .global(qos: .default)) {
        print("4 seconds later")
    }
    EasyGCD.after(DispatchTime.now() + 6, queue: .main) {
        print("6 seconds later")
    }
}

func once() {
    EasyGCD.once(token: "Once") {
        print("Once")
    }
}

Latest podspec

{
    "name": "EasyGCD",
    "version": "1.4.0",
    "summary": "A tiny library to make using GCD easier.",
    "homepage": "https://github.com/Meniny/EasyGCD",
    "license": "MIT",
    "authors": {
        "Elias Abel": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Meniny/EasyGCD.git",
        "tag": "1.4.0"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "5"
    },
    "swift_versions": "5",
    "source_files": "EasyGCD/*.*",
    "module_name": "EasyGCD",
    "public_header_files": "EasyGCD/*.h",
    "frameworks": "Foundation"
}

Pin It on Pinterest

Share This