fast-wait-free-queue icon indicating copy to clipboard operation
fast-wait-free-queue copied to clipboard

Re-use initialized ring queues, instead of leaking

Open KvGeijer opened this issue 1 year ago • 0 comments

In the LCRQ, when another thread manages to enqueue a new ring queue with CAS before you manage, you have already initialized your RQ. Now the local one is just discarded, which leaks memory.

There is infrastructure in place in the handle to save these initialized ring queues, and later re-use them in future enqueues. This commit fixes that optimization, which seems to have been broken sometime in the past.

KvGeijer avatar Sep 11 '24 20:09 KvGeijer