A fast multi-producer, multi-consumer lock-free concurrent queue for C++11 (by cameron314)

Moodycamel Alternatives

Similar projects and alternatives to moodycamel

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better moodycamel alternative or higher similarity.

Suggest an alternative to moodycamel

moodycamel reviews and mentions

Posts with mentions or reviews of moodycamel. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-04-21.
  • How should you "fix your timestep" for physics?
    1 project | | 27 May 2022
    In c++ the moodycamel ConcurrentQueue is a good choice.
  • Efficient asynchronous programming -- search keywords/basic pointers (ha)/examples?
    1 project | | 30 Apr 2022
    Here's a decent concurrent queue: moodycamel::ConcurrentQueue.
  • moodycamel VS lockfree_mpmc_queue - a user suggested alternative
    2 projects | 21 Apr 2022
  • Lockless Queue Not Working
    1 project | | 8 Mar 2022
    Lock free programming is hard, and probably harder than you think. I would not even try something like that myself. I would look for existing solutions, something like for example.
  • Simple Blocking/Nonblocking Concurrent (thread-safe) Queue Adapter, header only library
    1 project | | 14 Feb 2022
    I needed a concurrent queue that would block when attempting to pop an empty queue, which allows the consuming thread to suspend while it's waiting for work. I found that using mutexes allowed me to develop a simple template adapter had several advantages with few drawbacks when compared to non-blocking queues: it can use a variety of containers, the code can be reviewed and verified as to its correctness (very hard to do with fancy concurrent programming that avoids mutexes), and it is only slightly slower than fancier solutions (when I benchmarked it originally, it was 4x slower than Moody Camel's concurrent queue, which to me is fine performance).
  • Matthias Killat - Lock-free programming for real-time systems - Meeting C++ 2021
    2 projects | | 22 Jan 2022
    Not literatue but an example. This is a lock-free (not wait-free!) multi-producer multi-consumer queue, not a FIFO, but access patterns should be similar - if not the same:
  • Learning Clojure made me return back to C/C++
    8 projects | | 23 Jul 2021
    If I do implement it, the most likely route I'd take is make a compiler in Clojure/clojurescript that uses Instaparse (I have a more-or-less-clojure grammar written that I was tinkering with) and generate C++ code that uses Immer for its data structures and Zug for transducers and what my not-quite-clojure would support would be heavily dependent on what the C++ code and libraries I use can do. I'd use Taskflow to implement a core.async style system (not sure how to implement channels, maybe this but I'm unsure if its a good fit, but I also haven't looked). I would ultimately want to be able to interact with C++ code, so having some way to call C++ classes (even templated ones) would be a must. I'm unsure if I would just copy (and extend as needed) Clojure's host interop functionality or not. I had toyed with the idea that you can define the native types (including templates) as part of the type annotations and then the user-level code basically just looks like a normal function. But I didn't take it very far yet, haven't had the time. The reason I'd take this approach is that I'm writing a good bit of C++ again and I'd love to do that in this not-quite-clojure language, if I did make it. A bunch of languages, like Haxe and Nim compile to C or C++, so I think its a perfectly reasonable approach, and if interop works well enough, then just like Clojure was able to leverage the Java ecosystem, not-quite-clojure could be bootstrapped by leveraging the C++ ecosystem. But its mostly just a vague dream right now.
  • Recommendations for C++ library for shared memory (multiple producers/single consumer)
    3 projects | | 28 May 2021
    I would recommend as it's very battle tested and fast.
  • fmtlog: fastest C++ logging library using fmtlib syntax
    2 projects | | 6 May 2021
    This was explicitly considered for spdlog (using the moodycamel::ConcurrentQueue) but rejected for the above reason. I'm not involved in the development of spdlog but personally I agree, for me it's important that log output is not all mixed up.
  • Functional programming in C++ (2012)
    2 projects | | 28 Dec 2020
    > So the big win with functional programming is easier testibility and fewer hazards when trying to multi-thread your code.

    To give you my experience: during my phd, I developed in C++. For the manuscript redaction, I rewrote all the core algorithms in pure functional OCaml. When I did some tests, performance was slower than -O0 C++ (so it's not even a given that multithreaded OCaml would outperform single-thread C++), the tests weren't meaningfully simpler to write, and it would be pretty much impossible to have an average comp. sci. student contribute to the code.

    My experience multi-threading C++ code is, "slap cpp-taskflow, TBB, RaftLib" or any kind of threaded task system and enjoy arbitrary scaling. Hardly the pain it is made to be unless you have a need to go down to std::thread level, but even then using something like to communicate between threads makes things extremely painless.


Basic moodycamel repo stats
9 days ago

cameron314/concurrentqueue is an open source project licensed under GNU General Public License v3.0 or later which is an OSI approved license.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Find remote jobs at our new job board There are 7 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.