()
| 8339 | return nextItem; |
| 8340 | } |
| 8341 | }; |
| 8342 | module.exports = class FixedQueue { |
| 8343 | constructor() { |
| 8344 | this.head = this.tail = new FixedCircularBuffer(); |
| 8345 | } |
| 8346 | isEmpty() { |
| 8347 | return this.head.isEmpty(); |
| 8348 | } |
| 8349 | push(data) { |
| 8350 | if (this.head.isFull()) { |
| 8351 | this.head = this.head.next = new FixedCircularBuffer(); |