pd: 👯 use tokio's JoinSet
for polling servers
#3680
Labels
A-node
Area: System design and implementation for node software
C-enhancement
Category: an enhancement to the codebase
_P-low
Priority: low
in
pd
's startup code, we usetokio::select!
to poll a bundle of futures, none of which should return until an error is encountered.this would be a great opportunity to use
tokio::task::JoinSet
, which has recently been added to the library beneath thert
feature flag.quoth the docs:
these properties (particularly grouping up tasks to abort upon failure/shutdown) are all what we want, and it exposes (imo) a friendlier interface than the alternate macro syntax.
additionally, it would make it much easier to propagate errors from other subsystems, e.g. ACME events (see #3652), to be fatal.
cc: @conorsch 🔖
The text was updated successfully, but these errors were encountered: