Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source Swift Library Providing A Nice Concise Syntax For Working With GCD

  •  
  •  
  •  
  •  
  •  

In the past I’ve mentioned a few resources simplifying the se of Grand Central Dispatch with Objective-C, but as of yet have not mentioned a helper library for working with GCD in Swift.

Here’s an open source library from TheHolyGrail providing a concise syntax for working with GCD using Swift language features.

KillerRabbit provides abstractions of the dispatch_, dispatch_queue, dispatch_block, dispatch_group, dispatch_source, and dispatch_semaphore APIs.

This snippet from the readme shows one could execute a few tasks asynchronously and wait indefinitely:

DispatchGroup().async(.Background) {
    doSomething(1)
}.async(.Utility) {
    doSomething(2)
}.async(.High) {
    doSomethingUrgently(3)
}.wait()

You can find KillerRabbit on Github here.

A nice library with a great syntax for working with GCD.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments