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
f50647d0
Commit
f50647d0
authored
Nov 07, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate review feedback
parent
3c34148d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
libcaf_core/caf/detail/profiled_send.hpp
libcaf_core/caf/detail/profiled_send.hpp
+0
-1
libcaf_core/caf/response_promise.hpp
libcaf_core/caf/response_promise.hpp
+2
-1
libcaf_core/src/response_promise.cpp
libcaf_core/src/response_promise.cpp
+10
-10
No files found.
libcaf_core/caf/detail/profiled_send.hpp
View file @
f50647d0
...
...
@@ -20,7 +20,6 @@
#include <vector>
#include "caf/abstract_actor.hpp"
#include "caf/actor_cast.hpp"
#include "caf/actor_clock.hpp"
#include "caf/actor_control_block.hpp"
...
...
libcaf_core/caf/response_promise.hpp
View file @
f50647d0
...
...
@@ -132,7 +132,8 @@ public:
}
private:
local_actor
*
self_ptr
()
const
;
/// Returns a downcasted version of `self_`.
local_actor
*
self_dptr
()
const
;
execution_unit
*
context
();
...
...
libcaf_core/src/response_promise.cpp
View file @
f50647d0
...
...
@@ -68,7 +68,7 @@ bool response_promise::async() const {
return
id_
.
is_async
();
}
local_actor
*
response_promise
::
self_ptr
()
const
{
local_actor
*
response_promise
::
self_
d
ptr
()
const
{
// TODO: We require that self_ was constructed by using a local_actor*. The
// type erasure performed by strong_actor_ptr hides that fact. We
// probably should use a different pointer type such as
...
...
@@ -80,7 +80,7 @@ local_actor* response_promise::self_ptr() const {
}
execution_unit
*
response_promise
::
context
()
{
return
self_
==
nullptr
?
nullptr
:
self_ptr
()
->
context
();
return
self_
==
nullptr
?
nullptr
:
self_
d
ptr
()
->
context
();
}
void
response_promise
::
deliver_impl
(
message
msg
)
{
...
...
@@ -89,18 +89,18 @@ void response_promise::deliver_impl(message msg) {
CAF_LOG_DEBUG
(
"drop response: invalid promise"
);
return
;
}
auto
self
=
self_
ptr
();
auto
dptr
=
self_d
ptr
();
if
(
!
stages_
.
empty
())
{
auto
next
=
std
::
move
(
stages_
.
back
());
stages_
.
pop_back
();
detail
::
profiled_send
(
self
,
std
::
move
(
source_
),
next
,
id_
,
std
::
move
(
stages_
),
self
->
context
(),
std
::
move
(
msg
));
detail
::
profiled_send
(
dptr
,
std
::
move
(
source_
),
next
,
id_
,
std
::
move
(
stages_
),
dptr
->
context
(),
std
::
move
(
msg
));
self_
.
reset
();
return
;
}
if
(
source_
)
{
detail
::
profiled_send
(
self
,
self_
,
source_
,
id_
.
response_id
(),
no_stages
,
self
->
context
(),
std
::
move
(
msg
));
detail
::
profiled_send
(
dptr
,
self_
,
source_
,
id_
.
response_id
(),
no_stages
,
dptr
->
context
(),
std
::
move
(
msg
));
self_
.
reset
();
source_
.
reset
();
return
;
...
...
@@ -118,9 +118,9 @@ void response_promise::delegate_impl(abstract_actor* receiver, message msg) {
CAF_LOG_DEBUG
(
"drop response: invalid promise"
);
return
;
}
auto
self
=
self_
ptr
();
detail
::
profiled_send
(
self
,
std
::
move
(
source_
),
receiver
,
id_
,
std
::
move
(
stages_
),
self
->
context
(),
std
::
move
(
msg
));
auto
dptr
=
self_d
ptr
();
detail
::
profiled_send
(
dptr
,
std
::
move
(
source_
),
receiver
,
id_
,
std
::
move
(
stages_
),
dptr
->
context
(),
std
::
move
(
msg
));
self_
.
reset
();
}
...
...
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