1 import { Scheduler } from '../Scheduler';
2 export class AsyncScheduler extends Scheduler {
3 constructor(SchedulerAction, now = Scheduler.now) {
4 super(SchedulerAction, () => {
5 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
6 return AsyncScheduler.delegate.now();
14 this.scheduled = undefined;
16 schedule(work, delay = 0, state) {
17 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
18 return AsyncScheduler.delegate.schedule(work, delay, state);
21 return super.schedule(work, delay, state);
25 const { actions } = this;
33 if (error = action.execute(action.state, action.delay)) {
36 } while (action = actions.shift());
39 while (action = actions.shift()) {
46 //# sourceMappingURL=AsyncScheduler.js.map