Replace <= with == to make it clearer the size is always a power of two
Evan Huus
8 years ago
81 | 81 |
q.buf[q.head] = nil
|
82 | 82 |
q.head = (q.head + 1) % len(q.buf)
|
83 | 83 |
q.count--
|
84 | |
if len(q.buf) > minQueueLen && q.count*4 <= len(q.buf) {
|
|
84 |
if len(q.buf) > minQueueLen && q.count*4 == len(q.buf) {
|
85 | 85 |
q.resize()
|
86 | 86 |
}
|
87 | 87 |
}
|