Skip to content

Instantly share code, notes, and snippets.

View shonorio's full-sized avatar

Solli Moreira Honorio shonorio

View GitHub Profile
import Foundation
import PlaygroundSupport
/// A thread-safe array.
public class SynchronizedArray<Element> {
fileprivate let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent)
fileprivate var array = [Element]()
}
// MARK: - Properties