PMKConfiguration
public struct PMKConfiguration
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 sadly Swift does not expose dispatch_once et al. which is what we used to use in order to make the configuration immutable once first used.
-
Backward compatibility: the default Dispatcher to which handlers dispatch, represented as DispatchQueues.
Declaration
Swift
public var Q: (map: DispatchQueue?, return: DispatchQueue?) { get set } -
The default Dispatchers to which promise handlers dispatch
Declaration
Swift
public var D: (map: Dispatcher, return: Dispatcher) -
The default catch-policy for all
catchandresolveDeclaration
Swift
public var catchPolicy: CatchPolicy -
The closure used to log PromiseKit events. Not thread safe; change before processing any promises.
Note
The default handler callsprint()Declaration
Swift
public var logHandler: (LogEvent) -> Void
View on GitHub
PMKConfiguration Structure Reference