Commit df5b5349 authored by Dominik Charousset's avatar Dominik Charousset

Remove dead code

parent 4793d6a2
...@@ -27,40 +27,17 @@ ...@@ -27,40 +27,17 @@
#include "caf/detail/single_reader_queue.hpp" #include "caf/detail/single_reader_queue.hpp"
namespace caf {
namespace detail {
class memory;
} // namespace detail
} // namespace caf
namespace caf { namespace caf {
namespace io { namespace io {
class middleman; /**
* Implements a simple proxy forwarding all operations to a manager.
class sync_request_info : public extend<memory_managed>:: */
with<mixin::memory_cached> {
friend class detail::memory;
public:
using pointer = sync_request_info*;
~sync_request_info();
pointer next; // intrusive next pointer
actor_addr sender; // points to the sender of the message
message_id mid; // sync message ID
private:
sync_request_info(actor_addr sptr, message_id id);
};
class remote_actor_proxy : public actor_proxy { class remote_actor_proxy : public actor_proxy {
using super = actor_proxy;
public: public:
remote_actor_proxy(actor_id mid, node_id pinfo, remote_actor_proxy(actor_id mid, node_id pinfo, actor parent);
actor parent);
~remote_actor_proxy();
void enqueue(const actor_addr&, message_id, void enqueue(const actor_addr&, message_id,
message, execution_unit*) override; message, execution_unit*) override;
...@@ -73,16 +50,11 @@ class remote_actor_proxy : public actor_proxy { ...@@ -73,16 +50,11 @@ class remote_actor_proxy : public actor_proxy {
void kill_proxy(uint32_t reason) override; void kill_proxy(uint32_t reason) override;
protected:
~remote_actor_proxy();
private: private:
void forward_msg(const actor_addr& sender, message_id mid, message msg); void forward_msg(const actor_addr& sender, message_id mid, message msg);
actor m_parent; actor m_manager;
}; };
using remote_actor_proxy_ptr = intrusive_ptr<remote_actor_proxy>;
} // namespace io } // namespace io
} // namespace caf } // namespace caf
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "caf/send.hpp" #include "caf/send.hpp"
#include "caf/to_string.hpp" #include "caf/to_string.hpp"
#include "caf/io/middleman.hpp"
#include "caf/io/remote_actor_proxy.hpp" #include "caf/io/remote_actor_proxy.hpp"
#include "caf/detail/memory.hpp" #include "caf/detail/memory.hpp"
...@@ -33,38 +32,25 @@ using namespace std; ...@@ -33,38 +32,25 @@ using namespace std;
namespace caf { namespace caf {
namespace io { namespace io {
inline sync_request_info* new_req_info(actor_addr sptr, message_id id) {
return detail::memory::create<sync_request_info>(std::move(sptr), id);
}
sync_request_info::~sync_request_info() {
// nop
}
sync_request_info::sync_request_info(actor_addr sptr, message_id id)
: next(nullptr), sender(std::move(sptr)), mid(id) {
// nop
}
remote_actor_proxy::remote_actor_proxy(actor_id aid, node_id nid, actor parent) remote_actor_proxy::remote_actor_proxy(actor_id aid, node_id nid, actor parent)
: super(aid, nid), m_parent(parent) { : actor_proxy(aid, nid),
m_manager(parent) {
CAF_REQUIRE(parent != invalid_actor); CAF_REQUIRE(parent != invalid_actor);
CAF_LOG_INFO(CAF_ARG(aid) << ", " << CAF_TARG(nid, to_string)); CAF_LOG_INFO(CAF_ARG(aid) << ", " << CAF_TARG(nid, to_string));
} }
remote_actor_proxy::~remote_actor_proxy() { remote_actor_proxy::~remote_actor_proxy() {
anon_send(m_parent, make_message(atom("_DelProxy"), node(), id())); anon_send(m_manager, make_message(atom("_DelProxy"), node(), id()));
} }
void remote_actor_proxy::forward_msg(const actor_addr& sender, message_id mid, void remote_actor_proxy::forward_msg(const actor_addr& sender, message_id mid,
message msg) { message msg) {
CAF_LOG_TRACE(CAF_ARG(id()) << ", " << CAF_TSARG(sender) << ", " CAF_LOG_TRACE(CAF_ARG(id()) << ", " << CAF_TSARG(sender) << ", "
<< CAF_MARG(mid, integer_value) << ", " << CAF_MARG(mid, integer_value) << ", " << CAF_TSARG(msg));
<< CAF_TSARG(msg)); m_manager->enqueue(invalid_actor_addr, invalid_message_id,
m_parent->enqueue( make_message(atom("_Dispatch"), sender,
invalid_actor_addr, invalid_message_id, address(), mid, std::move(msg)),
make_message(atom("_Dispatch"), sender, address(), mid, std::move(msg)), nullptr);
nullptr);
} }
void remote_actor_proxy::enqueue(const actor_addr& sender, message_id mid, void remote_actor_proxy::enqueue(const actor_addr& sender, message_id mid,
......
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