Skip to content

BrianSemiglia/NonCoalescingDispatchQueue

Repository files navigation

NonCoalescingDispatchQueue

[![CI Status](http://img.shields.io/travis/Brian Semiglia/NonCoalescingDispatchQueue.svg?style=flat)](https://travis-ci.org/Brian Semiglia/NonCoalescingDispatchQueue) Version License Platform

GCD likes to coalesce calls to -dispatchAfter. NonCoalescingDispatchQueue avoids that coalescence with the use of a CADisplayLink giving you timing accuracy to the 60th of a second.

Example

NonCoalescingDispatchQueue(
  events: @[
    NonCoalescingDispatchQueue.Event(
      delay: 1.00,
      action: { 
        print("hi") 
      }
    ),
    NonCoalescingDispatchQueue.Event(
      delay: 1.03,
      action: { 
        print("hola")
      }
    ),
    NonCoalescingDispatchQueue.Event(
      delay: 1.05,
      action: { 
        print("salut")
      }
    )
  ],
  completion: {
    print("bye")
  }
)

Requirements

Installation

NonCoalescingDispatchQueue is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "NonCoalescingDispatchQueue"

Author

Brian Semiglia, [email protected]

License

NonCoalescingDispatchQueue is available under the MIT license. See the LICENSE file for more info.

About

A non-coalescing dispatch queue written in Swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published