Other Structures
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 sadly
See moreSwiftdoes not exposedispatch_onceet al. which is what we used to use in order to make the configuration immutable once first used.Declaration
Swift
public struct PMKConfiguration -
A
See moreDispatcherthat bundles aDispatchQueuewith aDispatchGroup, a set ofDispatchWorkItemFlags, and a quality-of-service level. Closures dispatched through thisDispatcherwill be submitted to the underlyingDispatchQueuewith the supplied components.Declaration
Swift
public struct DispatchQueueDispatcher : Dispatcher -
A
Dispatcherclass that executes all closures synchronously on the current thread.Useful for temporarily disabling asynchrony and multithreading while debugging
PromiseKitchains.You can set
See morePromiseKit‘s default dispatching behavior to this mode by settingconf.Q.mapand/orconf.Q.returntonil. (This is the same as assigning an instance ofCurrentThreadDispatcherto these variables.)Declaration
Swift
public struct CurrentThreadDispatcher : Dispatcher -
A
See moreDispatcherthat dispatches onto the threads associated withNSManagedObjectContexts, allowing Core Data operations to be handled using promises.Declaration
Swift
public struct CoreDataDispatcher : Dispatcher
View on GitHub
Other Structures Reference