public class DefaultActionDispatcher : ActionDispatcher
The default dispatcher implementation that provides the ability to observe when actions are performed, across sessions.
This will attempt to detect if the caller is on the queue the action expects, and avoid crashing with a
call when already on that queue. If the current queue is not the action’s queue, it will use a
The goal is that if the app is on the main queue, call
perform and the dispatcher than finds the action expects
main queue, that no queue or async thread hops occur. This prevents a
slushy UI that is always updating
asynchronously, and means the caller does not have to worry about the queue they are on, and nor does the
However, it is important to not that this mechanism (using setSpecific/getSpecific) will not currently work if the Action’s
queue uses a
target queue. Trivia: the
Perform the action, and track whether or not it was already completed by the time it returns, so whether sync or async, we know if
completionshould be called at some future point, so we can warn about this and maybe have a timeout in debug to catch occasions where this does not happen.