Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

AsapScheduler.js 783B

12345678910111213141516171819202122232425
  1. import { AsyncScheduler } from './AsyncScheduler';
  2. export class AsapScheduler extends AsyncScheduler {
  3. flush(action) {
  4. this.active = true;
  5. this.scheduled = undefined;
  6. const { actions } = this;
  7. let error;
  8. let index = -1;
  9. let count = actions.length;
  10. action = action || actions.shift();
  11. do {
  12. if (error = action.execute(action.state, action.delay)) {
  13. break;
  14. }
  15. } while (++index < count && (action = actions.shift()));
  16. this.active = false;
  17. if (error) {
  18. while (++index < count && (action = actions.shift())) {
  19. action.unsubscribe();
  20. }
  21. throw error;
  22. }
  23. }
  24. }
  25. //# sourceMappingURL=AsapScheduler.js.map