mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-07-30 10:18:41 -04:00
refactor
This commit is contained in:
parent
cd0cd78e30
commit
7e0d7dad06
108 changed files with 1378 additions and 1535 deletions
|
@ -5,7 +5,7 @@ cfg_if! {
|
|||
if #[cfg(feature="rt-async-std")] {
|
||||
pub use async_std::task::JoinHandle;
|
||||
pub use async_std::net::TcpStream;
|
||||
pub use async_std::future::TimeoutError;
|
||||
//pub use async_std::future::TimeoutError;
|
||||
pub use async_std::sync::Mutex as AsyncMutex;
|
||||
|
||||
pub fn spawn<F: Future<Output = T> + Send + 'static, T: Send + 'static>(f: F) -> JoinHandle<T> {
|
||||
|
@ -17,7 +17,7 @@ cfg_if! {
|
|||
} else if #[cfg(feature="rt-tokio")] {
|
||||
pub use tokio::task::JoinHandle;
|
||||
pub use tokio::net::TcpStream;
|
||||
pub use tokio::time::error::Elapsed as TimeoutError;
|
||||
//pub use tokio::time::error::Elapsed as TimeoutError;
|
||||
pub use tokio::sync::Mutex as AsyncMutex;
|
||||
pub fn spawn<F: Future<Output = T> + Send + 'static, T: Send + 'static>(f: F) -> JoinHandle<T> {
|
||||
GLOBAL_RUNTIME.spawn(f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue