GitXplorerGitXplorer
c

Later

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
b1c5a7dcde353fdcf8d5b57b23dd35ac646db17d

Converted to Swift 3

ccoryalder committed 8 years ago
Unverified
c9d3bf9d958cb3471ea09b82082eecfc447c9ac5

Ported to swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a

ccoryalder committed 9 years ago
Unverified
20aa8b4c2abbfb392c1320d2db965ae50f2861eb

added note about 0 timeout

ccoryalder committed 9 years ago
Unverified
ebfd155c3537796a6dd40ea3ea5a3c1d5366823f

reordered readme

ccoryalder committed 9 years ago
Unverified
a9784b808e48c88a846f392ff3cede2ecca1547a

updated readme

ccoryalder committed 9 years ago
Unverified
56a9f6b920e7f9092a559b7622e7a2567d93785b

First commit

ccoryalder committed 9 years ago

README

The README file for this repository.

Later

Make a synchronous operation synchronous. Abstracts away the details of dispatch_semaphore_wait et al. so you don't have to worry about it.

Usage

import Later

let later = Later(3) // default delay is 5s

someAsyncOperation() {
  
  // async operation is complete, so finish the later.
  later.done()
}

later.wait() // while the async operation is completing, let's chill for up to 3s

A delay timeout of 0 means wait forever.

Installation

Swift Package Manager

Add Later to your Package.swift file:

import PackageDescription

let package = Package(
    name: "YourPackageName",
    dependencies: [
        .Package(url: "https://github.com/coryalder/Later.git", majorVersion: 0),
    ]
)