Sha256: 302a67335d4cbd5355b8cde54f6bd29424e20123ed253e4c2edaac5c1435ecc4

Contents?: true

Size: 746 Bytes

Versions: 53

Compression:

Stored size: 746 Bytes

Contents

import { AsyncAction } from './AsyncAction';
import { AsyncScheduler } from './AsyncScheduler';

export class AsapScheduler extends AsyncScheduler {
  public flush(action?: AsyncAction<any>): void {

    this.active = true;
    this.scheduled = undefined;

    const {actions} = this;
    let error: any;
    let index: number = -1;
    let count: number = actions.length;
    action = action || actions.shift();

    do {
      if (error = action.execute(action.state, action.delay)) {
        break;
      }
    } while (++index < count && (action = actions.shift()));

    this.active = false;

    if (error) {
      while (++index < count && (action = actions.shift())) {
        action.unsubscribe();
      }
      throw error;
    }
  }
}

Version data entries

53 entries across 51 versions & 5 rubygems

Version Path
reed_sdk-1.0.1 node_modules/concurrently/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts
reed_sdk-1.0.0 node_modules/concurrently/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts
ilog-0.4.1 node_modules/rxjs/src/scheduler/AsapScheduler.ts
ilog-0.4.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
ilog-0.3.3 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-18.0.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.21.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.20.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.19.1 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.19.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.18.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.17.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.16.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.15.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.14.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.13.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.12.2 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.12.1 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.12.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts
govuk_publishing_components-17.11.0 node_modules/rxjs/src/scheduler/AsapScheduler.ts