#![deny(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
#![warn(missing_docs)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::new_without_default)]
#![allow(clippy::len_without_is_empty)]
#![allow(clippy::borrowed_box)]
#![allow(clippy::new_ret_no_self)]
#[cfg(not(feature = "std"))]
extern crate alloc;
pub mod platform;
pub mod error;
pub mod executor;
pub mod memory;
pub mod pool;
pub mod scheduler;
pub mod task;
#[cfg(feature = "std")]
pub mod channel;
#[cfg(feature = "coroutine")]
pub mod coroutine;
#[cfg(feature = "std")]
pub mod communication;
#[cfg(all(any(unix, windows), feature = "std"))]
pub mod ipc;
pub use error::{ExecutorError, PlacementFailure, SchedulerError, TaskError};
pub use executor::{ExecutorConfig, TaskManager, TaskSpawner, TaskStatus, WorkerPlacement};
pub use scheduler::SchedulerId;
pub use task::{Priority, Task, TaskBuilder, TaskContext, TaskExt, TaskFuture, TaskHandle, TaskId};
#[cfg(feature = "std")]
pub use channel::{
Channel, ChannelConfig, ChannelError, ChannelStatistics, Consumer, DEFAULT_CHANNEL_CAPACITY,
MpmcChannel, MpmcReceiver, MpmcSender, Producer, Select, SpscConsumer, SpscProducer,
SpscReceiver, SpscRing, SpscSender, UnifiedReceiver, UnifiedSender, mpmc, spsc,
unified_channel, unified_channel_with_config,
};
pub use moirai_utils::CacheAligned;
#[cfg(feature = "coroutine")]
pub use coroutine::{
Coroutine, CoroutineExt, CoroutineFuture, CoroutineIterator, CoroutineResult, CoroutineState,
FunctionCoroutine,
};
pub use platform::{Arc, Box, String, Vec};
pub type BoxError = Box<dyn core::error::Error + Send + Sync>;
pub type Result<T> = core::result::Result<T, BoxError>;
pub mod prelude {
pub use crate::{
ExecutorError, Priority, SchedulerError, SchedulerId, Task, TaskContext, TaskError,
TaskExt, TaskFuture, TaskId, TaskManager, TaskSpawner, TaskStatus,
};
#[cfg(feature = "std")]
pub use crate::{
Channel, ChannelError, Consumer, DEFAULT_CHANNEL_CAPACITY, MpmcReceiver, MpmcSender,
Producer, SpscConsumer, SpscProducer, SpscReceiver, SpscRing, SpscSender, mpmc, spsc,
};
}