Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
f476b6f5
Commit
f476b6f5
authored
Jun 27, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix multi-line comment warnings
parent
27c59b0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
examples/dynamic_behavior/dining_philosophers.cpp
examples/dynamic_behavior/dining_philosophers.cpp
+4
-4
examples/remoting/distributed_calculator.cpp
examples/remoting/distributed_calculator.cpp
+4
-4
No files found.
examples/dynamic_behavior/dining_philosophers.cpp
View file @
f476b6f5
/******************************************************************************\
/******************************************************************************\
* This example is an implementation of the classical Dining Philosophers *
* This example is an implementation of the classical Dining Philosophers *
* exercise using only libcaf's event-based actor implementation. *
* exercise using only libcaf's event-based actor implementation. *
\
******************************************************************************/
\******************************************************************************/
#include <map>
#include <map>
#include <thread>
#include <thread>
...
@@ -68,7 +68,7 @@ chopstick::behavior_type taken_chopstick(chopstick::pointer self,
...
@@ -68,7 +68,7 @@ chopstick::behavior_type taken_chopstick(chopstick::pointer self,
//
//
//
//
// +-------------+ {busy|taken}
// +-------------+ {busy|taken}
//
/-------->| thinking |<------------------\
//
+-------->| thinking |<------------------+
// | +-------------+ |
// | +-------------+ |
// | | |
// | | |
// | | {eat} |
// | | {eat} |
...
@@ -86,10 +86,10 @@ chopstick::behavior_type taken_chopstick(chopstick::pointer self,
...
@@ -86,10 +86,10 @@ chopstick::behavior_type taken_chopstick(chopstick::pointer self,
// | +-------------+
// | +-------------+
// | | |
// | | |
// | {busy} | | {taken}
// | {busy} | | {taken}
//
\-----------/
|
//
+-----------+
|
// | V
// | V
// | {think} +-------------+
// | {think} +-------------+
//
\
---------| eating |
//
+
---------| eating |
// +-------------+
// +-------------+
class
philosopher
:
public
event_based_actor
{
class
philosopher
:
public
event_based_actor
{
...
...
examples/remoting/distributed_calculator.cpp
View file @
f476b6f5
...
@@ -56,21 +56,21 @@ behavior calculator_fun() {
...
@@ -56,21 +56,21 @@ behavior calculator_fun() {
// |
// |
// V
// V
// +-------------+
// +-------------+
// | unconnected |<------------------
\
// | unconnected |<------------------
+
// +-------------+ |
// +-------------+ |
// | |
// | |
// | {connect Host Port} |
// | {connect Host Port} |
// | |
// | |
// V |
// V |
// +-------------+ {error} |
// +-------------+ {error} |
//
/-------------->| connecting |------------------>|
//
+-------------->| connecting |-------------------+
// | +-------------+
^
// | +-------------+
|
// | | |
// | | |
// | | {ok, Calculator} |
// | | {ok, Calculator} |
// |{connect Host Port} | |
// |{connect Host Port} | |
// | V |
// | V |
// | +-------------+ {DOWN server} |
// | +-------------+ {DOWN server} |
//
\---------------| running |-------------------/
//
+---------------| running |-------------------+
// +-------------+
// +-------------+
namespace
client
{
namespace
client
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment