MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / push

Method push

lib/stream-id-stack.js:123–134  ·  view source on GitHub ↗

* Enqueue an id for future use. * Similar to Array#push(). * @param {Number} id

(id)

Source from the content-addressed store, hash-verified

121 * @param {Number} id
122 */
123 push(id) {
124 this.inUse--;
125 const groupIndex = id >> shiftToGroup;
126 const group = this.groups[groupIndex];
127 group.push(id);
128 if (groupIndex < this.groupIndex) {
129 //Set the lower group to be used to dequeue from
130 this.groupIndex = groupIndex;
131 this.currentGroup = group;
132 }
133 this._tryIssueRelease();
134 }
135
136 /**
137 * Clears all timers

Callers 1

_tryCreateGroupMethod · 0.45

Calls 1

_tryIssueReleaseMethod · 0.95

Tested by

no test coverage detected