Commit 2dfe753e authored by Dominik Charousset's avatar Dominik Charousset

Deprecate remaining `*_send_tuple` functions

parent 889067e5
...@@ -78,7 +78,7 @@ void client_bhvr(event_based_actor* self, const string& host, ...@@ -78,7 +78,7 @@ void client_bhvr(event_based_actor* self, const string& host,
} }
} }
auto sync_send_request = [=](int lhs, const char* op, int rhs) { auto sync_send_request = [=](int lhs, const char* op, int rhs) {
self->sync_send_tuple(server, self->last_dequeued()).then( self->sync_send(server, self->last_dequeued()).then(
[=](result_atom, int result) { [=](result_atom, int result) {
aout(self) << lhs << " " << op << " " << rhs << " = " << result << endl; aout(self) << lhs << " " << op << " " << rhs << " = " << result << endl;
} }
......
...@@ -400,11 +400,11 @@ class local_actor : public abstract_actor { ...@@ -400,11 +400,11 @@ class local_actor : public abstract_actor {
attach(attachable_ptr{new functor_attachable(std::move(f))}); attach(attachable_ptr{new functor_attachable(std::move(f))});
} }
// <backward_compatibility version="0.9">
/************************************************************************** /**************************************************************************
* outdated member functions * * outdated member functions *
**************************************************************************/ **************************************************************************/
// <backward_compatibility version="0.9">
inline void send_tuple(message_priority prio, const channel& whom, inline void send_tuple(message_priority prio, const channel& whom,
message what) CAF_DEPRECATED; message what) CAF_DEPRECATED;
...@@ -464,23 +464,11 @@ class local_actor : public abstract_actor { ...@@ -464,23 +464,11 @@ class local_actor : public abstract_actor {
} }
// returns the response ID // returns the response ID
message_id timed_sync_send_tuple_impl(message_priority mp, message_id timed_sync_send_impl(message_priority, const actor&,
const actor& whom, const duration&, message&&);
const duration& rel_time,
message&& what);
// returns the response ID // returns the response ID
message_id sync_send_tuple_impl(message_priority mp, message_id sync_send_impl(message_priority, const actor&, message&&);
const actor& whom,
message&& what);
// returns the response ID
template <class... Rs, class... Ts>
message_id sync_send_tuple_impl(message_priority mp,
const typed_actor<Rs...>& whom,
message&& msg) {
return sync_send_tuple_impl(mp, actor{whom.m_ptr.get()}, std::move(msg));
}
// returns 0 if last_dequeued() is an asynchronous or sync request message, // returns 0 if last_dequeued() is an asynchronous or sync request message,
// a response id generated from the request id otherwise // a response id generated from the request id otherwise
......
This diff is collapsed.
...@@ -179,14 +179,12 @@ void local_actor::quit(uint32_t reason) { ...@@ -179,14 +179,12 @@ void local_actor::quit(uint32_t reason) {
} }
} }
message_id local_actor::timed_sync_send_tuple_impl(message_priority mp, message_id local_actor::timed_sync_send_impl(message_priority mp,
const actor& dest, const actor& dest,
const duration& rtime, const duration& rtime,
message&& what) { message&& what) {
if (!dest) { if (!dest) {
throw std::invalid_argument( throw std::invalid_argument("cannot sync_send to invalid_actor");
"cannot send synchronous message "
"to invalid_actor");
} }
auto nri = new_request_id(); auto nri = new_request_id();
if (mp == message_priority::high) { if (mp == message_priority::high) {
...@@ -200,13 +198,11 @@ message_id local_actor::timed_sync_send_tuple_impl(message_priority mp, ...@@ -200,13 +198,11 @@ message_id local_actor::timed_sync_send_tuple_impl(message_priority mp,
return rri; return rri;
} }
message_id local_actor::sync_send_tuple_impl(message_priority mp, message_id local_actor::sync_send_impl(message_priority mp,
const actor& dest, const actor& dest,
message&& what) { message&& what) {
if (!dest) { if (!dest) {
throw std::invalid_argument( throw std::invalid_argument("cannot sync_send to invalid_actor");
"cannot send synchronous message "
"to invalid_actor");
} }
auto nri = new_request_id(); auto nri = new_request_id();
if (mp == message_priority::high) { if (mp == message_priority::high) {
......
...@@ -158,7 +158,7 @@ class D : public popular_actor { ...@@ -158,7 +158,7 @@ class D : public popular_actor {
behavior make_behavior() override { behavior make_behavior() override {
return { return {
others() >> [=] { others() >> [=] {
return sync_send_tuple(buddy(), last_dequeued()).then( return sync_send(buddy(), last_dequeued()).then(
others() >> [=]() -> message { others() >> [=]() -> message {
quit(); quit();
return last_dequeued(); return last_dequeued();
......
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