|
|
|
|
|
by vitpro2213
741 days ago
|
|
If you discard the old array (and allocate a bigger one before), you must also copy all enqueued material. Also this one enqueue will be mega expensive - a clear "fat tail" in the latency histogram. In MultiArrayQueue you keep all already enqueued material in-place, "just" allocate the bigger array, register the new diversion, enqueue the one new element - and done. Thanks |
|
for me it would be better to allocate new buffer but allow reading from old one until it contains data and after that dealocate it and keep only new one in use