Skip to content

Commit 058b315

Browse files
chore(syncronizer): use spawn macro for top level task
1 parent bfcdc69 commit 058b315

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/syncronizer/src/syncronizer.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@ impl<C: Collection> Syncronizer<C> {
9191
let State::Initialized(mut inner) = state else {
9292
panic!("Syncronizer can only be started once");
9393
};
94-
tokio::spawn(async move { shutdown.run_until_shutdown(inner.run(tx)).await });
94+
let panic_waiter = shutdown.clone();
95+
spawn!(
96+
async move { shutdown.run_until_shutdown(inner.run(tx)).await },
97+
"SYNCRONIZER",
98+
crucial(panic_waiter)
99+
);
95100
}
96101

97102
fn prelude(

0 commit comments

Comments
 (0)