use futures::future::BoxFuture;
mod blocking;
pub use blocking::*;
mod handle;
pub use handle::*;
#[cfg(not(target_arch = "wasm32"))]
pub mod current;
#[cfg(not(target_arch = "wasm32"))]
mod pool;
#[cfg(not(target_arch = "wasm32"))]
pub mod single;
#[cfg(not(target_arch = "wasm32"))]
mod smol;
#[cfg(feature = "tokio")]
pub mod tokio;
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
pub mod wasm;
#[cfg(test)]
mod tests;
pub trait Executor: Send + Sync {
fn spawn(&self, fut: BoxFuture<'static, ()>) -> AbortHandleRef;
fn spawn_cpu(&self, task: Box<dyn FnOnce() + Send + 'static>) -> AbortHandleRef;
fn spawn_blocking_io(&self, task: Box<dyn FnOnce() + Send + 'static>) -> AbortHandleRef;
}
pub trait AbortHandle: Send + Sync {
fn abort(self: Box<Self>);
}
pub type AbortHandleRef = Box<dyn AbortHandle>;