MCPcopy Create free account
hub / github.com/coopernurse/node-pool / constructor

Method constructor

lib/PriorityQueue.js:10–18  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

8 */
9class PriorityQueue {
10 constructor(size) {
11 this._size = Math.max(+size | 0, 1);
12 /** @type {Queue[]} */
13 this._slots = [];
14 // initialize arrays to hold queue elements
15 for (let i = 0; i < this._size; i++) {
16 this._slots.push(new Queue());
17 }
18 }
19
20 get length() {
21 let _length = 0;

Callers

nothing calls this directly

Calls 2

maxMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected