A set of C++ header-only data structures to handle multithreaded tasks.
It is currently relying on Boost for thread platform abstraction but a C++11 compliant version will be added in a near future.
This project is maintained by Mikros Image R&D Team and distributed under the MIT license.
Have a look at the example folder for some code. But here is a quick tour :
- A simple object allowing to wait for an acknowledgement.
- An object holder with notification capabilities.
- An unlimited concurrent queue for passing messages between threads.
- A bounded concurrent queue for passing messages between threads.
- A cache that fills itself automagically with the help of one or more worker threads. This component is currently in use within Duke to enable image preloading but could be used whenever you need to hide latencies (i.e. I/O over disk or network).
- include this folder
- link with boost_thread
The simplest way to compile the provided tests and examples in a multiplatform way is to use Boost.Build system.
- First get the last version of Boost from the website and unzip where approriate (you'll need Boost anyway)
- export the BOOST_ROOT env and boostrap to generate b2
export BOOST_ROOT=/path/to/boost
cd $BOOST_ROOT
./booststrap.sh
- compile and run the tests
cd /path/to/concurrent_utils
$BOOST_ROOT/b2 --toolset=gcc tests
- compile the examples
$BOOST_ROOT/b2 --toolset=gcc examples release
The examples will be available in the examples/bin directory.
Unless mentioned otherwise b2 will create a debug version, in the case of the examples the release version is build.
As for make you can add a -jX option
If you want to use another compiler, just change the toolset ( clang, darwin, icc, msvc ... )
If you need some more informations about Boost.Build have a look at this page or at the Boost.Build documentation
- GCC 4.4.1 on OpenSUSE 11.2
- Clang 3.0 on Gentoo
- GCC 4.5.3 on Gentoo
- GCC 4.6.2 on Gentoo
- GCC 4.5.2 on Windows XP GCC TDM
Copyright (C) 2011-2012 Guillaume Chatelet. See LICENSE.txt for further details.