Commit ea2f6731 authored by Dominik Charousset's avatar Dominik Charousset

un-inlined receive_response

parent d94685c0
......@@ -505,14 +505,7 @@ inline message_future sync_send(const actor_ptr& whom, Args&&... what) {
* @throws std::logic_error if @p handle is not valid or if the actor
* already received the response for @p handle
*/
inline sync_recv_helper receive_response(const message_future& handle) {
return {handle.id(), [](behavior& bhvr, message_id_t mf) {
if (!self->awaits(mf)) {
throw std::logic_error("response already received");
}
self->dequeue_response(bhvr, mf);
}};
}
sync_recv_helper receive_response(const message_future& handle);
/**
* @brief Sends a message to the sender of the last received message.
......
......@@ -28,6 +28,7 @@
\******************************************************************************/
#include "cppa/cppa.hpp"
#include "cppa/receive.hpp"
namespace cppa {
......@@ -56,5 +57,13 @@ void receive_loop(partial_function&& rules) {
receive_loop(tmp);
}
sync_recv_helper receive_response(const message_future& handle) {
return {handle.id(), [](behavior& bhvr, message_id_t mf) {
if (!self->awaits(mf)) {
throw std::logic_error("response already received");
}
self->dequeue_response(bhvr, mf);
}};
}
} // namespace cppa
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment