Skip to content

Commit e3e6537

Browse files
committed
Run reload handlers in parallel
1 parent 6aa2e36 commit e3e6537

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

crates/cli/src/lifecycle.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,14 @@ impl LifecycleManager {
168168
.expect("Failed to read monotonic clock")
169169
]);
170170

171-
// XXX: if the handler takes a long time, it will block the
171+
// XXX: if one handler takes a long time, it will block the
172172
// rest of the shutdown process, which is not ideal. We
173173
// should probably have a timeout here
174-
for handler in &self.reload_handlers {
175-
handler().await;
176-
}
174+
futures_util::future::join_all(
175+
self.reload_handlers
176+
.iter()
177+
.map(|handler| handler())
178+
).await;
177179

178180
notify(&[sd_notify::NotifyState::Ready]);
179181

0 commit comments

Comments
 (0)