Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Neverlord committed Nov 5, 2012
1 parent 5c305d0 commit 62ace65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/message_passing/math_actor.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/******************************************************************************\
* This example is a very basic, non-interactive math service implemented *
* for both the blocking and the event-based API. *
\******************************************************************************/

#include <string>
#include <cassert>
#include <iostream>
Expand All @@ -7,6 +12,7 @@ using std::cout;
using std::endl;
using namespace cppa;

// implementation using the blocking API
void math_fun() {
bool done = false;
do_receive (
Expand All @@ -30,6 +36,7 @@ void math_fun() {
.until(gref(done));
}

// implementation using the event-based API
struct math_actor : event_based_actor {
void init() {
// execute this behavior until actor terminates
Expand Down

0 comments on commit 62ace65

Please sign in to comment.