Commit 4a7db979 authored by Dominik Charousset's avatar Dominik Charousset

Allow sinks to become congested

parent ee79735b
......@@ -58,6 +58,10 @@ public:
CAF_LOG_ERROR("received unexpected batch type (dropped)");
}
bool congested() const noexcept override {
return driver_.congested();
}
protected:
void finalize(const error& reason) override {
driver_.finalize(reason);
......
......@@ -60,6 +60,12 @@ public:
/// Processes a single batch.
virtual void process(std::vector<input_type>& batch) = 0;
/// Can mark the sink as congested, e.g., when writing into a buffer that
/// fills up faster than it is drained.
virtual bool congested() const noexcept {
return false;
}
};
} // namespace caf
......
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