feat(tasks): enable graceful shutdown request via TaskExecutor (#16386)

Signed-off-by: 7suyash7 <suyashnyn1@gmail.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Suyash Nayan
2025-05-22 15:57:26 +05:30
committed by GitHub
parent 6cf363ba88
commit 9a1e4ffd7e
2 changed files with 103 additions and 26 deletions

View File

@@ -174,8 +174,10 @@ where
{
let fut = pin!(fut);
tokio::select! {
err = tasks => {
return Err(err.into())
task_manager_result = tasks => {
if let Err(panicked_error) = task_manager_result {
return Err(panicked_error.into());
}
},
res = fut => res?,
}