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
175ba34a
Commit
175ba34a
authored
Sep 08, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix response promise issue with capture-by-value
parent
d9bff303
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
libcaf_core/caf/response_promise.hpp
libcaf_core/caf/response_promise.hpp
+1
-1
libcaf_core/src/response_promise.cpp
libcaf_core/src/response_promise.cpp
+1
-2
No files found.
libcaf_core/caf/response_promise.hpp
View file @
175ba34a
...
...
@@ -55,7 +55,7 @@ class response_promise {
/**
* Sends `response_message` and invalidates this handle afterwards.
*/
void
deliver
(
message
response_message
);
void
deliver
(
message
response_message
)
const
;
private:
actor_addr
m_from
;
...
...
libcaf_core/src/response_promise.cpp
View file @
175ba34a
...
...
@@ -32,14 +32,13 @@ response_promise::response_promise(const actor_addr& from, const actor_addr& to,
CAF_REQUIRE
(
id
.
is_response
()
||
!
id
.
valid
());
}
void
response_promise
::
deliver
(
message
msg
)
{
void
response_promise
::
deliver
(
message
msg
)
const
{
if
(
!
m_to
)
{
return
;
}
auto
to
=
actor_cast
<
abstract_actor_ptr
>
(
m_to
);
auto
from
=
actor_cast
<
abstract_actor_ptr
>
(
m_from
);
to
->
enqueue
(
m_from
,
m_id
,
move
(
msg
),
from
->
m_host
);
m_to
=
invalid_actor_addr
;
}
}
// 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