A Swift package for rapid development using a collection of micro extensions for Standard Library, Foundation, and more. Includes documentation and unit tests. Cross-platform targets for macOS, iOS, watchOS, tvOS, and iPadOS and were used across various apps for providing a central and extensible API.
Thread-safe resources in Swift can be achieved with Grand Central Dispatch. Using a concurrent queue and the barrier flag, reads can occur in parallel while writes are given mutual exclusivity for safety and optimization.
Grand Central Dispatch (GCD) is a great technology provided by Apple. It provides an elegant level of abstraction to work with threads, queues, and locks. And it went through a much needed make-over in Swift 3. In this post, I would like to take this one step further using enums as a queue factory.