Giter Site home page Giter Site logo

mfkiwl / lockfreequeue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from craflin/lockfreequeue

0.0 1.0 0.0 38 KB

A lock-free multi-producer multi-consumer ring buffer FIFO queue.

License: Apache License 2.0

C++ 98.51% Batchfile 0.88% Shell 0.61%

lockfreequeue's Introduction

LockFreeQueue

Here, I am testing some multi-producer multi-consumer bounded ring buffer FIFO queue implementations for fun.

  • LockFreeQueueCpp11.h - The fastest lock free queue I have managed to implement.
  • LockFreeQueue.h - The fastest lock free queue I have managed to implement without c++11. It is equally fast as LockFreeQueueCpp11.h.
  • mpmc_bounded_queue.h - Bounded MPMC queue by [Dmitry Vyukov, 2011]
  • LockFreeQueueSlow1.h - My first attempt at implementing a lock free queue. It is working correctly, but it is a lot slower than LockFreeQueue.h.
  • LockFreeQueueSlow2.h - A lock free queue based on [John D. Valois, 1994]. The queue uses Valois' algorithm adapted to a ring buffer structure with some modifications to tackle the ABA-Problem.
  • LockFreeQueueSlow3.h - Another lock free queue almost as fast as LockFreeQueue.h.
  • MutexLockQueue.h - A naive queue implementation that uses a conventional mutex lock (CriticalSecion / pthread-Mutex).
  • SpinLockQueue.h - A naive queue implementation that uses an atomic TestAndSet-lock.

And for the fun of it, here is a multi-producer multi-consumer LIFO queue:

References

[John D. Valois, 1994] - Implementing Lock-Free Queues
[Dmitry Vyukov, 2011] - Bounded MPMC queue

lockfreequeue's People

Contributors

craflin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.