Commit 0b175adc authored by Dominik Charousset's avatar Dominik Charousset

Fix formatting and documentation

parent 123506b1
...@@ -156,7 +156,7 @@ error message::load(deserializer& source) { ...@@ -156,7 +156,7 @@ error message::load(deserializer& source) {
return none; return none;
} }
error message::save(serializer& sink, const type_erased_tuple& x){ error message::save(serializer& sink, const type_erased_tuple& x) {
if (sink.context() == nullptr) if (sink.context() == nullptr)
return sec::no_context; return sec::no_context;
// build type name // build type name
......
...@@ -47,6 +47,18 @@ public: ...@@ -47,6 +47,18 @@ public:
message_queue(); message_queue();
// -- mutators ---------------------------------------------------------------
/// Adds a new message to the queue or deliver it immediately if possible.
void push(execution_unit* ctx, uint64_t id, strong_actor_ptr receiver,
mailbox_element_ptr content);
/// Marks given ID as dropped, effectively skipping it without effect.
void drop(execution_unit* ctx, uint64_t id);
/// Returns the next ascending ID.
uint64_t new_id();
// -- member variables ------------------------------------------------------- // -- member variables -------------------------------------------------------
/// Protects all other properties. /// Protects all other properties.
...@@ -62,18 +74,6 @@ public: ...@@ -62,18 +74,6 @@ public:
/// Keeps messages in sorted order in case a message other than /// Keeps messages in sorted order in case a message other than
/// `next_undelivered` gets ready first. /// `next_undelivered` gets ready first.
std::vector<actor_msg> pending; std::vector<actor_msg> pending;
// -- mutators ---------------------------------------------------------------
/// Adds a new message to the queue or deliver it immediately if possible.
void push(execution_unit* ctx, uint64_t id, strong_actor_ptr receiver,
mailbox_element_ptr content);
/// Marks given ID as dropped, effectively skipping it without effect.
void drop(execution_unit* ctx, uint64_t id);
/// Returns the next ascending ID.
uint64_t new_id();
}; };
} // namespace basp } // namespace basp
......
...@@ -61,7 +61,7 @@ public: ...@@ -61,7 +61,7 @@ public:
dst = sys.registry().get(static_cast<atom_value>(dref.hdr_.dest_actor)); dst = sys.registry().get(static_cast<atom_value>(dref.hdr_.dest_actor));
else else
dst = sys.registry().get(dref.hdr_.dest_actor); dst = sys.registry().get(dref.hdr_.dest_actor);
// Short circuit it we already know there's nothing to do. // Short circuit if we already know there's nothing to do.
if (dst == nullptr && !mid.is_request()) { if (dst == nullptr && !mid.is_request()) {
CAF_LOG_INFO("drop asynchronous remote message: unknown destination"); CAF_LOG_INFO("drop asynchronous remote message: unknown destination");
return; return;
......
...@@ -467,7 +467,7 @@ void basp_broker::learned_new_node(const node_id& nid) { ...@@ -467,7 +467,7 @@ void basp_broker::learned_new_node(const node_id& nid) {
} }
void basp_broker::learned_new_node_directly(const node_id& nid, void basp_broker::learned_new_node_directly(const node_id& nid,
bool was_indirectly_before) { bool was_indirectly_before) {
CAF_LOG_TRACE(CAF_ARG(nid)); CAF_LOG_TRACE(CAF_ARG(nid));
if (!was_indirectly_before) if (!was_indirectly_before)
learned_new_node(nid); learned_new_node(nid);
...@@ -533,7 +533,8 @@ void basp_broker::connection_cleanup(connection_handle hdl) { ...@@ -533,7 +533,8 @@ void basp_broker::connection_cleanup(connection_handle hdl) {
} }
} }
basp_broker::buffer_type& basp_broker::get_buffer(connection_handle hdl) { basp::instance::callee::buffer_type&
basp_broker::get_buffer(connection_handle hdl) {
return wr_buf(hdl); return wr_buf(hdl);
} }
......
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