Commit 641db02e authored by Dominik Charousset's avatar Dominik Charousset

Make `congested` noexcept and implement it

parent ca972736
......@@ -89,9 +89,8 @@ public:
return make_message_from_tuple(driver_.make_handshake(slot));
}
bool congested() const override {
// TODO: implement me
return out_.buffered() >= 30;
bool congested() const noexcept override {
return out_.capacity() == 0;
}
private:
......
......@@ -94,7 +94,7 @@ public:
/// Returns true if the handler is not able to process any further batches
/// since it is unable to make progress sending on its own.
virtual bool congested() const;
virtual bool congested() const noexcept;
/// Sends a handshake to `dest`.
/// @pre `dest != nullptr`
......
......@@ -116,7 +116,7 @@ void stream_manager::push() {
} while (generate_messages());
}
bool stream_manager::congested() const {
bool stream_manager::congested() const noexcept {
return false;
}
......
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