()
| 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 | |
| 193 | function generateGroup(initialValue) { |
no test coverage detected