# Lock Free FIFO and allocator?

**URL:** <https://forum.juce.com/t/lock-free-fifo-and-allocator/6049>\
**Category:** General JUCE discussion\
**Created:** [December 19, 2010, 8:18pm UTC](https://forum.juce.com/t/lock-free-fifo-and-allocator/6049 "2010-12-19T20:18:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bennie](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@bennie](https://forum.juce.com/u/bennie)\
**Post date:** [December 19, 2010, 8:18pm UTC](https://forum.juce.com/t/lock-free-fifo-and-allocator/6049/1 "2010-12-19T20:18:08Z")

</div>

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! 🙂 )

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

Thanks,  
Bennie

---

<div class="post-metadata">

**Author:** ![TheVinn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/thevinn/32/806_2.png) [@TheVinn](https://forum.juce.com/u/TheVinn)\
**Post date:** [December 19, 2010, 8:26pm UTC](https://forum.juce.com/t/lock-free-fifo-and-allocator/6049/2 "2010-12-19T20:26:25Z")

</div>

> **[KVR Forum: Lock-free FIFO/LIFO](https://www.kvraudio.com/forum/viewtopic.php?t=248404)**
>
> KVR Audio Forum - Lock-free FIFO/LIFO

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 19, 2010, 9:31pm UTC](https://forum.juce.com/t/lock-free-fifo-and-allocator/6049/3 "2010-12-19T21:31:39Z")

</div>

The AbstractFifo class is lock-free.

---

<div class="post-metadata">

**Author:** ![bennie](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@bennie](https://forum.juce.com/u/bennie)\
**Post date:** [December 20, 2010, 9:43am UTC](https://forum.juce.com/t/lock-free-fifo-and-allocator/6049/4 "2010-12-20T09:43:48Z")

</div>

> [@](#):
>
> The AbstractFifo class is lock-free.

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

---

<div class="post-metadata">

**Author:** ![TheVinn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/thevinn/32/806_2.png) [@TheVinn](https://forum.juce.com/u/TheVinn)\
**Post date:** [December 20, 2010, 1:22pm UTC](https://forum.juce.com/t/lock-free-fifo-and-allocator/6049/5 "2010-12-20T13:22:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TheVinn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/thevinn/32/806_2.png) [@TheVinn](https://forum.juce.com/u/TheVinn)\
**Post date:** [April 12, 2012, 1:48am UTC](https://forum.juce.com/t/lock-free-fifo-and-allocator/6049/6 "2012-04-12T01:48:45Z")

</div>

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:

> **[vinniefalco/VFLib](https://github.com/vinniefalco/VFLib)**
>
> Vinnie's Multipurpose Library (That Uses JUCE). Contribute to vinniefalco/VFLib development by creating an account on GitHub.
