ImmediateSchedulerType
public protocol ImmediateSchedulerType
Represents an object that immediately schedules units of work.
-
Schedules an action to be executed immediately.
Declaration
Swift
func schedule<StateType>(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable
Parameters
state
State passed to the action to be executed.
action
Action to be executed.
Return Value
The disposable object used to cancel the scheduled action (best effort).
-
scheduleRecursive(_:
Extension methodaction: ) Schedules an action to be executed recursively.
Declaration
Swift
public func scheduleRecursive<State>(_ state: State, action: @escaping (_ state: State, _ recurse: (State) -> Void) -> Void) -> Disposable
Parameters
state
State passed to the action to be executed.
action
Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state.
Return Value
The disposable object used to cancel the scheduled action (best effort).