Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thallium
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
sds
thallium
Commits
ef51919d
Commit
ef51919d
authored
Aug 08, 2018
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected bug with async_response's reference to callable_remote_procedure
parent
50e6f7bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
include/thallium/async_response.hpp
include/thallium/async_response.hpp
+12
-3
include/thallium/callable_remote_procedure.hpp
include/thallium/callable_remote_procedure.hpp
+1
-1
src/async_response.cpp
src/async_response.cpp
+2
-2
No files found.
include/thallium/async_response.hpp
View file @
ef51919d
...
...
@@ -30,7 +30,7 @@ private:
margo_request
m_request
;
engine
*
m_engine
;
callable_remote_procedure
&
m_rpc
;
hg_handle_t
m_handle
;
buffer
m_buffer
;
bool
m_ignore_response
;
...
...
@@ -43,11 +43,20 @@ private:
* @param c callable_remote_procedure that created the async_response.
* @param ignore_resp whether response should be ignored.
*/
async_response
(
margo_request
req
,
engine
&
e
,
callable_remote_procedure
&
c
,
bool
ignore_resp
)
:
m_request
(
req
),
m_engine
(
&
e
),
m_rpc
(
c
),
m_ignore_response
(
ignore_resp
)
{}
async_response
(
margo_request
req
,
engine
&
e
,
hg_handle_t
handle
,
bool
ignore_resp
)
:
m_request
(
req
),
m_engine
(
&
e
),
m_handle
(
handle
),
m_ignore_response
(
ignore_resp
)
{
margo_ref_incr
(
handle
);
}
public:
/**
* @brief Destructor.
*/
~
async_response
()
{
margo_destroy
(
m_handle
);
}
/**
* @brief Waits for the async_response to be ready and returns
* a packed_response when the response has been received.
...
...
include/thallium/callable_remote_procedure.hpp
View file @
ef51919d
...
...
@@ -89,7 +89,7 @@ private:
ret
=
margo_provider_iforward
(
m_provider_id
,
m_handle
,
const_cast
<
void
*>
(
static_cast
<
const
void
*>
(
&
buf
)),
&
req
);
MARGO_ASSERT
(
ret
,
margo_iforward
);
return
async_response
(
req
,
*
m_engine
,
*
this
,
m_ignore_response
);
return
async_response
(
req
,
*
m_engine
,
m_handle
,
m_ignore_response
);
}
public:
...
...
src/async_response.cpp
View file @
ef51919d
...
...
@@ -14,9 +14,9 @@ packed_response async_response::wait() {
MARGO_ASSERT
(
ret
,
margo_wait
);
buffer
output
;
if
(
m_ignore_response
)
return
packed_response
(
std
::
move
(
output
),
*
m_engine
);
ret
=
margo_get_output
(
m_
rpc
.
m_
handle
,
&
output
);
ret
=
margo_get_output
(
m_handle
,
&
output
);
MARGO_ASSERT
(
ret
,
margo_get_output
);
ret
=
margo_free_output
(
m_
rpc
.
m_
handle
,
&
output
);
// won't do anything on a buffer type
ret
=
margo_free_output
(
m_handle
,
&
output
);
// won't do anything on a buffer type
MARGO_ASSERT
(
ret
,
margo_free_output
);
return
packed_response
(
std
::
move
(
output
),
*
m_engine
);
}
...
...
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