Priority function queue with hrtime considerations
npm install priority-worker-queue  !npm
This is a worker queue built for single concurrency on asychronous job execution.
PriorityWorkerQueueDefaultPriorityWorkerQueue
EventEmitterPriorityWorkerQueue
PriorityWorkerQueueKind: global class
Extends: PriorityWorkerQueue
Kind: instance method of DefaultPriorityWorkerQueue
Overrides: enqueue
Returns: promise - Result of the enqueued function
| Param | Type | Description |
| --- | --- | --- |
| func | object \| function | Job object or function to be run. |
| args | array \| number | Array of arguments (or priority if no arguments) |
| [priority] | number | The priority of a job when both func/args are given |
EventEmitterKind: global class
Extends: EventEmitter
* PriorityWorkerQueue ⇐ EventEmitter
* new PriorityWorkerQueue(worker)
* .enqueue(job, priority) ⇒ promise
| Param | Type | Description |
| --- | --- | --- |
| worker | function | The worker to run on each job supplied to the queue |
Kind: instance method of PriorityWorkerQueue
Returns: promise - Retuns the result of the worker when running the job.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| job | object | | The job to be run |
| priority | Number | 0 | The priority of the job (higher number is a higher priority) |
© 2020 Mudrekh Goderya MIT