NonCoalescingDispatchQueue 0.2.0

NonCoalescingDispatchQueue 0.2.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release May 2019
SPMSupports SPM

Maintained by Brian Semiglia.



  • By
  • Brian Semiglia

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.