Commit 37652efa authored by Dominik Charousset's avatar Dominik Charousset

Grant users access filtering downstream lanes

parent aac42910
......@@ -28,6 +28,8 @@
#include "caf/downstream.hpp"
#include "caf/meta/type_name.hpp"
namespace caf {
/// A filtering downstream allows stages to fork into multiple lanes, where
......@@ -45,6 +47,10 @@ public:
struct lane {
typename super::queue_type queue;
typename super::path_ptr_list paths;
template <class Inspector>
friend typename Inspector::result_type inspect(Inspector& f, lane& x) {
return f(meta::type_name("lane"), x.queue, x.paths);
}
};
/// Identifies a lane inside the downstream. Filters are kept in sorted order
......@@ -110,6 +116,10 @@ public:
lanes_[std::move(f)].paths.push_back(super::find(x));
}
const lanes_map& lanes() const {
return lanes_;
}
private:
void erase_from_lanes(const strong_actor_ptr& x) {
for (auto i = lanes_.begin(); i != lanes_.end(); ++i)
......
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