Skip to content

mikrosimage/concurrent_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Concurrent utils

A set of C++11 header-only data structures to handle multithreaded tasks.

This code is highly inspired by Anthony Williams C++ Concurrency in Action


Provided facilities

Have a look at the example folder for some code. But here is a quick tour :

concurrent::notifier

  • A simple object allowing to wait for an acknowledgement.

concurrent::slot

  • An object holder with notification capabilities.

concurrent::queue

  • An unlimited concurrent queue for passing messages between threads.

concurrent::bounded_queue

  • A bounded concurrent queue for passing messages between threads.

concurrent::cache::lookahead_cache

  • 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).

Use

  • include this folder

Quick start

Tests and examples

make examples

Provides a few examples of how to use the library.

make test

You will need gtest to build the test suite.


Tested compilers

  • GCC 4.7.2 on Gentoo Linux
  • GCC 4.6.3 on Gentoo Linux ** use -std=c++0x instead of -std=c++11
  • Clang 3.2 runs into this GCC issue

Licence

MIT license

Copyright

Copyright (C) 2011-2013 Guillaume Chatelet. See LICENSE.txt for further details.

About

A set of reusable C++ classes for concurrent tasks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages