docs/Protocols/ImmediateSchedulerType.html
public protocol ImmediateSchedulerType
Represents an object that immediately schedules units of work.
`
schedule(_:action:)
`
Schedules an action to be executed immediately.
Swift
func schedule<StateType>(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable
| state |
State passed to the action to be executed.
|
| action |
Action to be executed.
|
The disposable object used to cancel the scheduled action (best effort).
`
scheduleRecursive(_:action:)
` Extension method
Schedules an action to be executed recursively.
Swift
func scheduleRecursive<State>(_ state: State, action: @escaping (_ state: State, _ recurse: (State) -> Void) -> Void) -> Disposable
| 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.
|
The disposable object used to cancel the scheduled action (best effort).