The following structures are available globally.
PromiseKit’s configurable parameters.
Do not change these after any Promise machinery executes as the configuration object is not thread-safe.
We would like it to be, but sadlySee more
Swiftdoes not expose
dispatch_onceet al. which is what we used to use in order to make the configuration immutable once first used.
public struct PMKConfiguration
Dispatcherthat bundles a
DispatchGroup, a set of
DispatchWorkItemFlags, and a quality-of-service level. Closures dispatched through this
Dispatcherwill be submitted to the underlying
DispatchQueuewith the supplied components.
public struct DispatchQueueDispatcher : Dispatcher
Dispatcherclass that executes all closures synchronously on the current thread.
Useful for temporarily disabling asynchrony and multithreading while debugging
You can setSee more
PromiseKit‘s default dispatching behavior to this mode by setting
nil. (This is the same as assigning an instance of
CurrentThreadDispatcherto these variables.)
public struct CurrentThreadDispatcher : Dispatcher