Boost logo

Boost :

Subject: [boost] [concurrent] Fast, lock-based queue implementation
From: David Stone (david_at_[hidden])
Date: 2017-06-18 00:09:19


I have written a new concurrent queue that has a focus on high throughput.
You can check it out here:

https://github.com/davidstone/concurrent-queue

Some highlights of this queue:

* The bulk interface is faster than other queues for many common load
patterns
* Almost any element type is supported with very few requirements
* Supports any number of producers
* Supports any number of consumers (although it works best with only one)
* Can dynamically grow and shrink in memory as needed
* The interface allows for very little undefined behavior: for the most
part, as long as your special member functions like move constructors do
not reference the queue you are inserting into, you are fine
* Interface based on the pattern of moving values in and returning values
via return, rather than other queues which use reference output parameters
* Header-only
* Design should be fairly straightforward to verify for correctness
* Compiles warning free with a very high warning level on gcc and clang
* Does not have any errors under ubsan, asan, or tsan

I would like to submit this for inclusion in Boost if people find it
interesting and useful, but first I would like to get some feedback on the
design, implementation, documentation, tests, etc.

I have tested this exact version on Gentoo Linux under clang 4.0 and gcc
6.3.0. I will be testing out Visual Studio 2015 and 2017 in the near future
to ensure there have not been any regressions. I have run fundamentally the
same queue on Visual Studio 2012 (no longer supported due to C++14
features), Visual Studio 2015 (Windows Server 2008 R2, Windows Server
2012), gcc 4.9.1 (Red Hat 6 under developer toolset 3), gcc 4.9.2 (Red Hat
7), and clang 3.9.0 (Red Hat 7) for several years now with no issues, so it
is a fairly mature design.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk