PrioritySynchronizer
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(numPriorities: number, throttleAfter: number, throttleWait: number) |
Member Summary
Public Members | ||
public get |
length: number |
|
public get |
totalElapsed: number |
|
public get |
totalJobs: number |
|
public get |
totalThrottles: number |
|
public get |
working: boolean |
Method Summary
Public Methods | ||
public |
clear(): void Reject all jobs in the queue and clear it. |
|
public |
push(priority: number, fn: function(): T): Promise<T> Push function to the Synchronizer for later, synchronous execution |
Inherited Summary
From class Observable | ||
public static get |
WILDCARD: string: string |
|
public |
bubble(observable: Observable, types: ...string) |
|
public |
fire(type: string, args: ...*): Promise | null |
|
public |
off(type: string, id: number) |
|
public |
on(type: string, callback: Function): number |
Public Constructors
public constructor(numPriorities: number, throttleAfter: number, throttleWait: number) source
Override:
Observable#constructorParams:
Name | Type | Attribute | Description |
numPriorities | number | ||
throttleAfter | number |
|
|
throttleWait | number |
|
Public Members
public get length: number source
public get totalElapsed: number source
public get totalJobs: number source
public get totalThrottles: number source
public get working: boolean source
Public Methods
public push(priority: number, fn: function(): T): Promise<T> source
Push function to the Synchronizer for later, synchronous execution
Params:
Name | Type | Attribute | Description |
priority | number | A discrete priority, 0 being highest. |
|
fn | function(): T | Function to be invoked later by this Synchronizer |
Return:
Promise<T> |