PASynchronizedDictionary

Build Status codecov doccov Version License Platform

Installation

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

pod 'PASynchronizedDictionary'

Usage

Import

First you need to import the library

import PASynchronizedDictionary

Initialization

When initializing a synchronized dictionary you have the option to pass a custom queue and an existing dictionary.

let customQueue = DispatchQueue(label: "io.customQueue", qos: .userInitiated, attributes: .concurrent)
let dict = [String: Int]()

// Initialize default synchronized dictionary
let synchronizedDict = PASynchronizedDictionary<Int>()

// Initialize with a custom queue
let synchronizedDict = PASynchronizedDictionary<Int>(queue: customQueue)

// Initialize with an existing dictionary
let synchronizedDict = PASynchronizedDictionary<Int>(dict: dict)

// Initialize with both a custom queue and an existing dictionary
let synchronizedDict = PASynchronizedDictionary<Int>(queue: customQueue, dict: dict) 

Documentation

Documentation for the project can be found here

Author

Patrick Akoury, patrick.akoury@outlook.com

License

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