CurrentThreadDispatcher
public struct CurrentThreadDispatcher : Dispatcher
A Dispatcher
class that executes all closures synchronously on
the current thread.
Useful for temporarily disabling asynchrony and
multithreading while debugging PromiseKit
chains.
You can set PromiseKit
‘s default dispatching behavior to this mode
by setting conf.Q.map
and/or conf.Q.return
to nil
. (This is the
same as assigning an instance of CurrentThreadDispatcher
to these
variables.)
-
Undocumented
Declaration
Swift
public func dispatch(_ body: () -> Void)