ReactorConfiguration
public struct ReactorConfiguration
A reactor configuration can be used to control how a reactor is executed, and what happens to tasks while the reactor is being executed.
Every TaskManager
has a queue of tasks and this queue keeps on growing as long as tasks are added to the manager.
A reactor has the power to pause this queue while it is being executed and can also tell a manager to requeue
any task that causes this reaction
-
Initializes a configuration
Declaration
Swift
public init( timeout: DispatchTimeInterval? = nil, requeuesTask: Bool = false, suspendsTaskQueue: Bool = false, reinterceptOnRequeue: Bool = false )
Parameters
timeout
how long before
execute
times outrequeuesTask
should that task that causes this reaction be requeued
suspendsQueue
should the task manager suspend execution of any further tasks until the reaction is complete
reintercept
should the interceptors be run again if a task is requeued?
-
Default configuration has no timeout, doesn’t requeue tasks and doesn’t suspend the queue
Declaration
Swift
public static let `default`: ReactorConfiguration