docs » cp.rx.CooperativeScheduler
Manages Observables using coroutines and a virtual clock that must be updated
manually.
- Constructors - API calls which return an object, typically one that offers API methods
- create
- Methods - API calls which can only be made on an object returned by a constructor
- isEmpth
- schedule
- update
| Signature | cp.rx.CooperativeScheduler.create([currentTime]) -> cp.rx.CooperativeScheduler |
|---|---|
| Type | Constructor |
| Description | Creates a new CooperativeScheduler. |
| Parameters |
|
| Returns |
|
| Signature | cp.rx.CooperativeScheduler:isEmpth() -> cp.rx.CooperativeScheduler |
|---|---|
| Type | Method |
| Description | Returns whether or not the CooperativeScheduler's queue is empty. |
| Returns |
|
| Signature | cp.rx.CooperativeScheduler:schedule(action[, delay]) -> cp.rx.Reference |
|---|---|
| Type | Method |
| Description | Schedules a function to be run after an optional delay. Returns a Reference that will stop |
| Parameters |
|
| Returns |
|
| Signature | cp.rx.CooperativeScheduler:update(delta) -> nil |
|---|---|
| Type | Method |
| Description | Triggers an update of the CooperativeScheduler. The clock will be advanced and the scheduler |
| Parameters |
|