Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6595e6e925 |
+11
-12
@@ -400,12 +400,15 @@ private:
|
|||||||
ch->push_sentinel(std::move(val));
|
ch->push_sentinel(std::move(val));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
// Backpressure, not loss. A full downstream channel means the consumer
|
||||||
ch->push(std::move(val));
|
// is behind, and the correct response is for this producer to run
|
||||||
} catch (const ChannelOverflowError&) {
|
// slower — not to discard a value. A dropped frame does not degrade a
|
||||||
throw ChannelOverflowError(ch->capacity(),
|
// result, it silently changes one, and the caller has no way to tell.
|
||||||
"pool node '" + name_ + "' " + output_port_label<I>());
|
//
|
||||||
}
|
// Safe here because sentinels are handled above, out-of-band: this
|
||||||
|
// blocks only on data, so the EOF token that unwinds the network can
|
||||||
|
// always overtake a stalled data path.
|
||||||
|
ch->push_blocking(std::move(val));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<std::size_t I>
|
template<std::size_t I>
|
||||||
@@ -706,12 +709,8 @@ private:
|
|||||||
ch->push_sentinel(std::move(val));
|
ch->push_sentinel(std::move(val));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
// See the note on the typed overload above: block rather than drop.
|
||||||
ch->push(std::move(val));
|
ch->push_blocking(std::move(val));
|
||||||
} catch (const ChannelOverflowError&) {
|
|
||||||
throw ChannelOverflowError(ch->capacity(),
|
|
||||||
"pool node '" + name_ + "'");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Obj& obj_;
|
Obj& obj_;
|
||||||
|
|||||||
Reference in New Issue
Block a user