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

Method _releaseGroups

lib/stream-id-stack.js:174–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172 }
173
174 _releaseGroups() {
175 let counter = 0;
176 let index = this.groups.length - 1;
177 //only release up to n groups (n = releasable size)
178 //shrink back up to n groups not all the way up to 1
179 while (counter++ < releasableSize && this.groups.length > releasableSize && index > this.groupIndex) {
180 if (this.groups[index].length !== groupSize) {
181 //the group is being used
182 break;
183 }
184 this.groups.pop();
185 index--;
186 }
187 this.releaseTimeout = null;
188 //Issue next release if applies
189 this._tryIssueRelease();
190 }
191}
192
193function generateGroup(initialValue) {

Callers 1

_tryIssueReleaseMethod · 0.95

Calls 2

_tryIssueReleaseMethod · 0.95
popMethod · 0.80

Tested by

no test coverage detected