CAF
0.17.6
|
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. Scoped actors allow actor interaction from the context of threads such as main.
To build libcaf,
you need GCC >= 4.8 or <tt>Clang >= 3.2</tt>, and
CMake`.
The usual build steps on Linux and macOS are:
./configure -
make`make install (as root, optionally)
Please run the unit tests as well to verify that libcaf
works properly.
`make test
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: https://github.com/actor-framework/actor-framework/issues
Please read the Manual for an introduction to libcaf
. It is available online on Read The Docs at https://actor-framework.readthedocs.io or as PDF at http://www.actor-framework.org/pdf/manual.pdf
The Math Actor Example shows the usage of receive_loop and arg_match. The Dining Philosophers Example introduces event-based actors covers various features of CAF.