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
231bd1ca
Commit
231bd1ca
authored
Aug 21, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unsafe (and ambiguous) anon_send overload
parent
b11bdbb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
+6
-14
libcaf_core/caf/send.hpp
libcaf_core/caf/send.hpp
+0
-9
libcaf_core/src/inbound_path.cpp
libcaf_core/src/inbound_path.cpp
+6
-5
No files found.
libcaf_core/caf/send.hpp
View file @
231bd1ca
...
@@ -106,15 +106,6 @@ void anon_send(const Dest& dest, Ts&&... xs) {
...
@@ -106,15 +106,6 @@ void anon_send(const Dest& dest, Ts&&... xs) {
std
::
forward
<
Ts
>
(
xs
)...);
std
::
forward
<
Ts
>
(
xs
)...);
}
}
/// Anonymously sends `dest` a message.
template
<
message_priority
P
=
message_priority
::
normal
,
class
...
Ts
>
void
anon_send
(
const
strong_actor_ptr
&
dest
,
Ts
&&
...
xs
)
{
static_assert
(
sizeof
...(
Ts
)
>
0
,
"no message to send"
);
if
(
dest
)
dest
->
get
()
->
eq_impl
(
make_message_id
(
P
),
nullptr
,
nullptr
,
std
::
forward
<
Ts
>
(
xs
)...);
}
/// Anonymously sends `dest` an exit message.
/// Anonymously sends `dest` an exit message.
template
<
class
Dest
>
template
<
class
Dest
>
void
anon_send_exit
(
const
Dest
&
dest
,
exit_reason
reason
)
{
void
anon_send_exit
(
const
Dest
&
dest
,
exit_reason
reason
)
{
...
...
libcaf_core/src/inbound_path.cpp
View file @
231bd1ca
...
@@ -154,8 +154,9 @@ void inbound_path::emit_irregular_shutdown(local_actor* self, error reason) {
...
@@ -154,8 +154,9 @@ void inbound_path::emit_irregular_shutdown(local_actor* self, error reason) {
/// after `self` already terminated and we must not form strong references
/// after `self` already terminated and we must not form strong references
/// after that point. Since upstream messages contain the sender address
/// after that point. Since upstream messages contain the sender address
/// anyway, we only omit redundant information anyways.
/// anyway, we only omit redundant information anyways.
anon_send
(
hdl
,
make
<
upstream_msg
::
forced_drop
>
(
anon_send
(
actor_cast
<
actor
>
(
hdl
),
slots
.
invert
(),
self
->
address
(),
std
::
move
(
reason
)));
make
<
upstream_msg
::
forced_drop
>
(
slots
.
invert
(),
self
->
address
(),
std
::
move
(
reason
)));
}
}
void
inbound_path
::
emit_irregular_shutdown
(
local_actor
*
self
,
void
inbound_path
::
emit_irregular_shutdown
(
local_actor
*
self
,
...
@@ -164,8 +165,8 @@ void inbound_path::emit_irregular_shutdown(local_actor* self,
...
@@ -164,8 +165,8 @@ void inbound_path::emit_irregular_shutdown(local_actor* self,
error
reason
)
{
error
reason
)
{
/// Note that we always send abort messages anonymous. See reasoning in first
/// Note that we always send abort messages anonymous. See reasoning in first
/// function overload.
/// function overload.
anon_send
(
hdl
,
make
<
upstream_msg
::
forced_drop
>
(
anon_send
(
actor_cast
<
actor
>
(
hdl
),
slots
.
invert
(),
self
->
address
(),
std
::
move
(
reason
)));
make
<
upstream_msg
::
forced_drop
>
(
slots
.
invert
(),
self
->
address
(),
std
::
move
(
reason
)));
}
}
}
// namespace caf
}
// namespace caf
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