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
63407ab1
Commit
63407ab1
authored
May 31, 2012
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactored down messages
parent
d62a3871
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
benchmarks/distributed.cpp
benchmarks/distributed.cpp
+1
-1
src/local_actor.cpp
src/local_actor.cpp
+4
-1
unit_testing/test__spawn.cpp
unit_testing/test__spawn.cpp
+2
-2
No files found.
benchmarks/distributed.cpp
View file @
63407ab1
...
@@ -367,7 +367,7 @@ void shutdown_mode(Iterator first, Iterator last) {
...
@@ -367,7 +367,7 @@ void shutdown_mode(Iterator first, Iterator last) {
self
->
monitor
(
x
);
self
->
monitor
(
x
);
send
(
x
,
atom
(
"shutdown"
));
send
(
x
,
atom
(
"shutdown"
));
receive
(
receive
(
on
(
atom
(
"DOWN"
),
x
,
val
<
std
::
uint32_t
>
)
>>
[]()
{
on
(
atom
(
"DOWN"
),
val
<
std
::
uint32_t
>
)
>>
[]()
{
// ok, done
// ok, done
},
},
after
(
std
::
chrono
::
seconds
(
10
))
>>
[
&
]()
{
after
(
std
::
chrono
::
seconds
(
10
))
>>
[
&
]()
{
...
...
src/local_actor.cpp
View file @
63407ab1
...
@@ -49,7 +49,10 @@ class down_observer : public attachable {
...
@@ -49,7 +49,10 @@ class down_observer : public attachable {
}
}
void
actor_exited
(
std
::
uint32_t
reason
)
{
void
actor_exited
(
std
::
uint32_t
reason
)
{
send
(
m_observer
,
atom
(
"DOWN"
),
m_observed
,
reason
);
if
(
m_observer
)
{
m_observer
->
enqueue
(
m_observed
.
get
(),
make_any_tuple
(
atom
(
"DOWN"
),
reason
));
}
}
}
bool
matches
(
const
attachable
::
token
&
match_token
)
{
bool
matches
(
const
attachable
::
token
&
match_token
)
{
...
...
unit_testing/test__spawn.cpp
View file @
63407ab1
...
@@ -542,8 +542,8 @@ size_t test__spawn() {
...
@@ -542,8 +542,8 @@ size_t test__spawn() {
CPPA_CHECK
(
self
->
last_sender
()
==
pong_actor
);
CPPA_CHECK
(
self
->
last_sender
()
==
pong_actor
);
flags
|=
0x01
;
flags
|=
0x01
;
},
},
on
<
atom
(
"DOWN"
),
actor_ptr
,
std
::
uint32_t
>
()
>>
[
&
](
const
actor_ptr
&
who
,
on
<
atom
(
"DOWN"
),
std
::
uint32_t
>
()
>>
[
&
](
std
::
uint32_t
reason
)
{
std
::
uint32_t
reason
)
{
auto
who
=
self
->
last_sender
();
if
(
who
==
pong_actor
)
{
if
(
who
==
pong_actor
)
{
flags
|=
0x02
;
flags
|=
0x02
;
CPPA_CHECK_EQUAL
(
reason
,
exit_reason
::
user_defined
);
CPPA_CHECK_EQUAL
(
reason
,
exit_reason
::
user_defined
);
...
...
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