Is there a lock free midi collector

Hello i am trying to make my plugin thread safe.
i was wondering if there was a Lock free implementation of a midi collector or midi message buffer.
If one doesn’t exist my plan is too try and combine the elements of abstractFifo and MidiMessageCollector.

My aim is to add messages to the buffer from multiple worker threads and while still being able to read them in the audio thread.

And timing is a factor i would like to do as close to real time as possible.

No, there’s nothing like that directly in JUCE. As you suggested, it should be reasonably straightforward to put something together which works using AbstractFifo.

Note that AbstractFifo is single-producer and single-consumer. If you’re writing into the fifo from multiple threads, you will need additional synchronization to ensure that only one thread is writing at any time. This will mean that your producer-side won’t be wait-free, although your consumer-side will be.