Lock Free FIFO and allocator?


#1

Hi, I’m in need of a lock free FIFO and a lock free pooled allocator for a Juce project I’m working on. So, my questions are:

  1. Is there anything like this in the Juce source that I’m just not seeing? (worth a try! :slight_smile: )

  2. Has anyone done anything like this before? Any tips you can share before I begin?

Thanks,
Bennie


#2

#3

The AbstractFifo class is lock-free.


#4

Aha, I hadn’t spotted that. Exactly what I need, thanks!


#5

It’s amazing how just when I think to myself “Hey, I could really use XXXX”…I look through Juce, and there it is!


#6

Lock-free and mostly wait-free FIFO for calling functors of arbitrary size, with custom memory allocator and only using 32-bit CompareAndSwap is now part of VFLib: