mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 18:07:47 +08:00
refactor(workspace): enforce layered crate boundaries
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
use std::future::Future;
|
||||
|
||||
pub fn spawn_named<F>(task_name: &'static str, future: F) -> tokio::task::JoinHandle<F::Output>
|
||||
where
|
||||
F: Future + Send + 'static,
|
||||
F::Output: Send + 'static,
|
||||
{
|
||||
tokio::spawn(async move {
|
||||
tracing::debug!(task = task_name, "spawned runtime task");
|
||||
future.await
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user