Swiftpack.co - NikSativa/NQueue as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by NikSativa.
NikSativa/NQueue 1.2.4
Wrapper of GCD queue with few cool features
⭐️ 0
🕓 1 week ago
iOS macOS watchOS tvOS macCatalyst
.package(url: "https://github.com/NikSativa/NQueue.git", from: "1.2.4")

NQueue

Build-Test GitHub license latest release latest tag

Wrapper of GCD queue with few cool features

safe execution of a synchronous task on the main thread from any thread ‘’’swift Queue.main.sync { // your task on main thread } ‘’’

Queueable protocol can help you test your code without threading by overriding real implementation via your own mock or existing Fake from NSpry framework

DelayedQueue make it simple to manage task execution as parameter at your discretion

Use standart queues ‘’’swift Queue.background.async ‘’’ ‘’’swift Queue.utility.asyncAfter ‘’’

or easily make your own ‘’’swift Queue.custom(label: “my line”).async ‘’’ ‘’’swift Queue.custom(label: “my line”, qos: .utility).async ‘’’

you can never go wrong with creating a queue due to explicit parameters ‘’’swift Queue.custom(label: “my line”, attributes: .serial).async ‘’’

ps: as all N-frameworks, this was covered by unit tests and contains independent TestHelpers framework.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics