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