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
fa5ad15f
Commit
fa5ad15f
authored
Apr 22, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove local_actor::current_message
parent
b4db95d5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
24 deletions
+0
-24
libcaf_core/caf/local_actor.hpp
libcaf_core/caf/local_actor.hpp
+0
-8
libcaf_core/caf/typed_actor_view.hpp
libcaf_core/caf/typed_actor_view.hpp
+0
-6
libcaf_core/test/actor_lifetime.cpp
libcaf_core/test/actor_lifetime.cpp
+0
-2
libcaf_core/test/message_lifetime.cpp
libcaf_core/test/message_lifetime.cpp
+0
-8
No files found.
libcaf_core/caf/local_actor.hpp
View file @
fa5ad15f
...
@@ -374,14 +374,6 @@ public:
...
@@ -374,14 +374,6 @@ public:
/// @cond PRIVATE
/// @cond PRIVATE
/// Returns the currently processed message.
/// @warning Only set during callback invocation. Calling this member function
/// is undefined behavior (dereferencing a `nullptr`) when not in a
/// callback or `forward_to` has been called previously.
inline
message
&
current_message
()
{
return
current_element_
->
msg
;
}
void
monitor
(
abstract_actor
*
whom
);
void
monitor
(
abstract_actor
*
whom
);
/// @endcond
/// @endcond
...
...
libcaf_core/caf/typed_actor_view.hpp
View file @
fa5ad15f
...
@@ -135,12 +135,6 @@ public:
...
@@ -135,12 +135,6 @@ public:
* miscellaneous actor operations *
* miscellaneous actor operations *
****************************************************************************/
****************************************************************************/
/// @cond PRIVATE
message
&
current_message
()
{
return
self_
->
current_message
();
}
/// @endcond
actor_system
&
system
()
const
{
actor_system
&
system
()
const
{
return
self_
->
system
();
return
self_
->
system
();
}
}
...
...
libcaf_core/test/actor_lifetime.cpp
View file @
fa5ad15f
...
@@ -73,8 +73,6 @@ behavior tester(event_based_actor* self, const actor& aut) {
...
@@ -73,8 +73,6 @@ behavior tester(event_based_actor* self, const actor& aut) {
// must be still alive at this point
// must be still alive at this point
CAF_CHECK_EQUAL
(
s_testees
.
load
(),
1
);
CAF_CHECK_EQUAL
(
s_testees
.
load
(),
1
);
CAF_CHECK_EQUAL
(
msg
.
reason
,
exit_reason
::
user_shutdown
);
CAF_CHECK_EQUAL
(
msg
.
reason
,
exit_reason
::
user_shutdown
);
CAF_CHECK_EQUAL
(
self
->
current_message
().
vals
()
->
get_reference_count
(),
1u
);
CAF_CHECK_EQUAL
(
&
msg
,
self
->
current_message
().
at
(
0
));
// testee might be still running its cleanup code in
// testee might be still running its cleanup code in
// another worker thread; by waiting some milliseconds, we make sure
// another worker thread; by waiting some milliseconds, we make sure
// testee had enough time to return control to the scheduler
// testee had enough time to return control to the scheduler
...
...
libcaf_core/test/message_lifetime.cpp
View file @
fa5ad15f
...
@@ -69,12 +69,9 @@ public:
...
@@ -69,12 +69,9 @@ public:
CAF_CHECK_EQUAL
(
a
,
1
);
CAF_CHECK_EQUAL
(
a
,
1
);
CAF_CHECK_EQUAL
(
b
,
2
);
CAF_CHECK_EQUAL
(
b
,
2
);
CAF_CHECK_EQUAL
(
c
,
3
);
CAF_CHECK_EQUAL
(
c
,
3
);
CAF_CHECK_GREATER
(
current_message
().
cvals
()
->
get_reference_count
(),
1u
);
CAF_CHECK_EQUAL
(
current_message
().
cvals
().
get
(),
msg_
.
cvals
().
get
());
},
},
[
=
](
const
down_msg
&
dm
)
{
[
=
](
const
down_msg
&
dm
)
{
CAF_CHECK_EQUAL
(
dm
.
reason
,
exit_reason
::
normal
);
CAF_CHECK_EQUAL
(
dm
.
reason
,
exit_reason
::
normal
);
CAF_CHECK_EQUAL
(
current_message
().
cvals
()
->
get_reference_count
(),
1u
);
CAF_CHECK_EQUAL
(
dm
.
source
,
aut_
.
address
());
CAF_CHECK_EQUAL
(
dm
.
source
,
aut_
.
address
());
quit
();
quit
();
}
}
...
@@ -111,7 +108,6 @@ CAF_TEST(message_lifetime_in_scoped_actor) {
...
@@ -111,7 +108,6 @@ CAF_TEST(message_lifetime_in_scoped_actor) {
CAF_CHECK_EQUAL
(
b
,
2
);
CAF_CHECK_EQUAL
(
b
,
2
);
CAF_CHECK_EQUAL
(
c
,
3
);
CAF_CHECK_EQUAL
(
c
,
3
);
CAF_CHECK_EQUAL
(
msg
.
cvals
()
->
get_reference_count
(),
2u
);
CAF_CHECK_EQUAL
(
msg
.
cvals
()
->
get_reference_count
(),
2u
);
CAF_CHECK_EQUAL
(
self
->
current_message
().
cvals
().
get
(),
msg
.
cvals
().
get
());
}
}
);
);
CAF_CHECK_EQUAL
(
msg
.
cvals
()
->
get_reference_count
(),
1u
);
CAF_CHECK_EQUAL
(
msg
.
cvals
()
->
get_reference_count
(),
1u
);
...
@@ -120,10 +116,6 @@ CAF_TEST(message_lifetime_in_scoped_actor) {
...
@@ -120,10 +116,6 @@ CAF_TEST(message_lifetime_in_scoped_actor) {
self
->
receive
(
self
->
receive
(
[
&
](
int
&
value
)
{
[
&
](
int
&
value
)
{
CAF_CHECK_EQUAL
(
msg
.
cvals
()
->
get_reference_count
(),
1u
);
CAF_CHECK_EQUAL
(
msg
.
cvals
()
->
get_reference_count
(),
1u
);
CAF_CHECK_EQUAL
(
self
->
current_message
().
cvals
()
->
get_reference_count
(),
1u
);
CAF_CHECK_NOT_EQUAL
(
self
->
current_message
().
cvals
().
get
(),
msg
.
cvals
().
get
());
value
=
10
;
value
=
10
;
}
}
);
);
...
...
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