Download

What is the purpose of DequeueCache in FLockFreePointerListFIFOIntrusive?

Hi, I just began reading the source code of Core so excuse me if the question was trivial.

The implementation of FLockFreePointerListFIFOIntrusive has 2 lock-free queues inside, linked list IncomingQueue for push, and fixed-size intermediate ring-buffer DequeueCache for pop.
For me it looks like IncomingQueue alone is enough to implement FIFO, with no extra costs of memory and transfer of elements on pop.

So, what is the design decision to make the FIFO to have 2 dedicated queues?
My best guess is pulling out elements from the narrow ring-buffer is something good for cache efficiency, but the benefit may vary with its use case.