pub mod builder;
pub mod config;
pub mod control;
pub mod manager;
pub mod parallelism;
pub mod placement;
pub mod spawner;
pub use builder::ExecutorBuilder;
pub use config::{CleanupConfig, ExecutorConfig, MemoryConfig, PreemptionConfig};
pub use control::ExecutorControl;
pub use manager::{TaskManager, TaskStats, TaskStatus};
pub use parallelism::logical_parallelism;
pub use placement::WorkerPlacement;
pub use spawner::TaskSpawner;
pub trait Executor: TaskSpawner + TaskManager + ExecutorControl {
#[cfg(feature = "metrics")]
fn stats(&self) -> ExecutorStats;
}
#[cfg(not(feature = "metrics"))]
#[derive(Debug, Clone, Default)]
pub struct ExecutorStats;
#[cfg(feature = "metrics")]
#[derive(Debug, Clone, Default)]
pub struct ExecutorStats {
pub tasks_executed: u64,
pub tasks_queued: usize,
pub avg_execution_time_ns: u64,
}