1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#![warn(missing_docs)]
pub mod core;
#[cfg(feature = "prefabs")]
pub mod prefab;
#[cfg(feature = "config")]
pub mod config;
#[allow(unused_variables)]
pub fn spawn_task<T>(name: &str, future: T) -> tokio::task::JoinHandle<T::Output>
where
T: futures::Future + Send + 'static,
T::Output: Send + 'static,
{
#[cfg(all(tokio_unstable, feature = "console"))]
return tokio::task::Builder::new().name(name).spawn(future);
#[cfg(not(all(tokio_unstable, feature = "console")))]
return tokio::spawn(future);
}