import { QueueScheduler } from './QueueScheduler'; /** * * Queue Scheduler * * <span class="informal">Put every next task on a queue, instead of executing it immediately</span> * * `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler. * * When used without delay, it schedules given task synchronously - executes it right when * it is scheduled. However when called recursively, that is when inside the scheduled task, * another task is scheduled with queue scheduler, instead of executing immediately as well, * that task will be put on a queue and wait for current one to finish. * * This means that when you execute task with `queue` scheduler, you are sure it will end * before any other task scheduled with that scheduler will start. * * ## Examples * Schedule recursively first, then do something * ```ts * import { queueScheduler } from 'rxjs'; * * queueScheduler.schedule(() => { * queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue * * console.log('first'); * }); * * // Logs: * // "first" * // "second" * ``` * * Reschedule itself recursively * ```ts * import { queueScheduler } from 'rxjs'; * * queueScheduler.schedule(function(state) { * if (state !== 0) { * console.log('before', state); * this.schedule(state - 1); // `this` references currently executing Action, * // which we reschedule with new state * console.log('after', state); * } * }, 0, 3); * * // In scheduler that runs recursively, you would expect: * // "before", 3 * // "before", 2 * // "before", 1 * // "after", 1 * // "after", 2 * // "after", 3 * * // But with queue it logs: * // "before", 3 * // "after", 3 * // "before", 2 * // "after", 2 * // "before", 1 * // "after", 1 * ``` */ export declare const queueScheduler: QueueScheduler; /** * @deprecated renamed. Use {@link queueScheduler} */ export declare const queue: QueueScheduler;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Action.d.ts | File | 1.26 KB | 0644 |
|
Action.js | File | 1.08 KB | 0644 |
|
Action.js.map | File | 356 B | 0644 |
|
AnimationFrameAction.d.ts | File | 739 B | 0644 |
|
AnimationFrameAction.js | File | 2.05 KB | 0644 |
|
AnimationFrameAction.js.map | File | 1.16 KB | 0644 |
|
AnimationFrameScheduler.d.ts | File | 212 B | 0644 |
|
AnimationFrameScheduler.js | File | 1.76 KB | 0644 |
|
AnimationFrameScheduler.js.map | File | 939 B | 0644 |
|
AsapAction.d.ts | File | 669 B | 0644 |
|
AsapAction.js | File | 2.03 KB | 0644 |
|
AsapAction.js.map | File | 1.17 KB | 0644 |
|
AsapScheduler.d.ts | File | 202 B | 0644 |
|
AsapScheduler.js | File | 1.68 KB | 0644 |
|
AsapScheduler.js.map | File | 918 B | 0644 |
|
AsyncAction.d.ts | File | 1.12 KB | 0644 |
|
AsyncAction.js | File | 3.44 KB | 0644 |
|
AsyncAction.js.map | File | 2.73 KB | 0644 |
|
AsyncScheduler.d.ts | File | 1.01 KB | 0644 |
|
AsyncScheduler.js | File | 2.38 KB | 0644 |
|
AsyncScheduler.js.map | File | 1.38 KB | 0644 |
|
QueueAction.d.ts | File | 734 B | 0644 |
|
QueueAction.js | File | 1.96 KB | 0644 |
|
QueueAction.js.map | File | 1.17 KB | 0644 |
|
QueueScheduler.d.ts | File | 114 B | 0644 |
|
QueueScheduler.js | File | 1.03 KB | 0644 |
|
QueueScheduler.js.map | File | 243 B | 0644 |
|
VirtualTimeScheduler.d.ts | File | 1.37 KB | 0644 |
|
VirtualTimeScheduler.js | File | 4.03 KB | 0644 |
|
VirtualTimeScheduler.js.map | File | 2.69 KB | 0644 |
|
animationFrame.d.ts | File | 1.28 KB | 0644 |
|
animationFrame.js | File | 445 B | 0644 |
|
animationFrame.js.map | File | 244 B | 0644 |
|
asap.d.ts | File | 1.62 KB | 0644 |
|
asap.js | File | 325 B | 0644 |
|
asap.js.map | File | 219 B | 0644 |
|
async.d.ts | File | 1.45 KB | 0644 |
|
async.js | File | 337 B | 0644 |
|
async.js.map | File | 221 B | 0644 |
|
queue.d.ts | File | 1.98 KB | 0644 |
|
queue.js | File | 337 B | 0644 |
|
queue.js.map | File | 221 B | 0644 |
|