libcaf
0.13.2
|
This library provides an implementation of the actor model for C++. It uses a network transparent messaging system to ease development of both concurrent and distributed software.
libcaf
uses a thread pool to schedule actors by default. A scheduled actor should not call blocking functions. Individual actors can be spawned (created) with a special flag to run in an own thread if one needs to make use of blocking APIs.
Writing applications in libcaf
requires a minimum of gluecode and each context is an actor. Even main is implicitly converted to an actor if needed.
To build libcaf,
you need `GCC >= 4.8 or Clang >= 3.2
, and CMake
.
The usual build steps on Linux and Mac OS X are:
mkdir build -
cd buildcmake .. -
make`make install (as root, optionally)
Please run the unit tests as well to verify that libcaf
works properly.
`./bin/unit_tests
Please submit a bug report that includes (a) your compiler version, (b) your OS, and (c) the output of the unit tests if an error occurs.
Windows is not supported yet, because MVSC++ doesn't implement the C++11 features needed to compile libcaf
.
Please read the Manual for an introduction to libcaf
. It is available online as HTML at http://neverlord.github.com/libcaf/manual/index.html or as PDF at http://neverlord.github.com/libcaf/manual/manual.pdf
The Math Actor Example shows the usage of receive_loop and arg_match. The Dining Philosophers Example introduces event-based actors and includes a lot of `libcaf features.