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
9c06c504
Commit
9c06c504
authored
Sep 11, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `on_arg_match` wherever possible
parent
3a757e76
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
manual/PatternMatching.tex
manual/PatternMatching.tex
+1
-1
manual/SendingMessages.tex
manual/SendingMessages.tex
+1
-1
manual/StronglyTypedActors.tex
manual/StronglyTypedActors.tex
+2
-2
manual/SynchronousMessages.tex
manual/SynchronousMessages.tex
+1
-1
No files found.
manual/PatternMatching.tex
View file @
9c06c504
...
@@ -149,7 +149,7 @@ message_handler fun {
...
@@ -149,7 +149,7 @@ message_handler fun {
on(intproj) >> [](int i)
{
on(intproj) >> [](int i)
{
// case 1: successfully converted a string
// case 1: successfully converted a string
}
,
}
,
on
_
arg
_
match >>
[](const string
&
str)
{
[](const string
&
str)
{
// case 2: str is not an integer
// case 2: str is not an integer
}
}
}
;
}
;
...
...
manual/SendingMessages.tex
View file @
9c06c504
...
@@ -31,7 +31,7 @@ void client(event_based_actor* self, const actor& master) {
...
@@ -31,7 +31,7 @@ void client(event_based_actor* self, const actor& master) {
become (
become (
on("foo", arg
_
match) >> [=](const string
&
request)
{
on("foo", arg
_
match) >> [=](const string
&
request)
{
return self->sync
_
send(master, atom("bar"), request).then(
return self->sync
_
send(master, atom("bar"), request).then(
on
_
arg
_
match >>
[=](const std::string
&
response)
{
[=](const std::string
&
response)
{
return response;
return response;
}
}
);
);
...
...
manual/StronglyTypedActors.tex
View file @
9c06c504
...
@@ -16,10 +16,10 @@ The argument to this function call \emph{must} be a match expression as shown in
...
@@ -16,10 +16,10 @@ The argument to this function call \emph{must} be a match expression as shown in
\begin{lstlisting}
\begin{lstlisting}
auto p0 = spawn
_
typed(
auto p0 = spawn
_
typed(
on
_
arg
_
match >>
[](int a, int b)
{
[](int a, int b)
{
return static
_
cast<double>(a) * b;
return static
_
cast<double>(a) * b;
}
,
}
,
on
_
arg
_
match >>
[](double a, double b)
{
[](double a, double b)
{
return std::make
_
tuple(a * b, a / b);
return std::make
_
tuple(a * b, a / b);
}
}
);
);
...
...
manual/SynchronousMessages.tex
View file @
9c06c504
...
@@ -47,7 +47,7 @@ When sending a synchronous message, the response handler can be passed by either
...
@@ -47,7 +47,7 @@ When sending a synchronous message, the response handler can be passed by either
void foo(event
_
based
_
actor* self, actor testee)
{
void foo(event
_
based
_
actor* self, actor testee)
{
// testee replies with a string to 'get'
// testee replies with a string to 'get'
self->sync
_
send(testee, atom("get")).then(
self->sync
_
send(testee, atom("get")).then(
on
_
arg
_
match >>
[=](const std::string
&
str)
{
[=](const std::string
&
str)
{
// handle str
// handle str
}
,
}
,
after(std::chrono::seconds(30)) >> [=]()
{
after(std::chrono::seconds(30)) >> [=]()
{
...
...
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