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.

  • Q

    Backward compatibility: the default Dispatcher to which handlers dispatch, represented as DispatchQueues.

    Declaration

    Swift

    public var Q: (map: DispatchQueue?, return: DispatchQueue?) { get set }
  • D

    The default Dispatchers to which promise handlers dispatch

    Declaration

    Swift

    public var D: (map: Dispatcher, return: Dispatcher)
  • The default catch-policy for all catch and resolve

    Declaration

    Swift

    public var catchPolicy: CatchPolicy
  • The closure used to log PromiseKit events. Not thread safe; change before processing any promises.

    Note

    The default handler calls print()

    Declaration

    Swift

    public var logHandler: (LogEvent) -> ()