Skip to main content

qubit_execution_services/
lib.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2025 - 2026.
4 *    Haixing Hu, Qubit Co. Ltd.
5 *
6 *    All rights reserved.
7 *
8 ******************************************************************************/
9//! # Qubit Execution Services
10//!
11//! Aggregated execution services facade for blocking, CPU-bound, Tokio blocking,
12//! and async IO tasks.
13//!
14//! # Author
15//!
16//! Haixing Hu
17
18mod execution_services;
19
20pub use execution_services::{
21    ExecutionServices,
22    ExecutionServicesBuildError,
23    ExecutionServicesBuilder,
24    ExecutionServicesShutdownReport,
25};
26pub use qubit_executor::TaskHandle;
27pub use qubit_executor::service::{
28    ExecutorService,
29    RejectedExecution,
30    ShutdownReport,
31};
32pub use qubit_rayon_executor::{
33    RayonExecutorService,
34    RayonExecutorServiceBuildError,
35    RayonExecutorServiceBuilder,
36    RayonTaskHandle,
37};
38pub use qubit_thread_pool::{
39    ThreadPool,
40    ThreadPoolBuildError,
41    ThreadPoolBuilder,
42};
43pub use qubit_tokio_executor::{
44    TokioExecutorService,
45    TokioIoExecutorService,
46    TokioTaskHandle,
47};
48
49/// Default managed service for synchronous tasks that may block an OS thread.
50pub type BlockingExecutorService = ThreadPool;
51
52/// Builder alias for configuring [`BlockingExecutorService`].
53pub type BlockingExecutorServiceBuilder = ThreadPoolBuilder;
54
55/// Tokio-backed blocking executor service routed through `spawn_blocking`.
56pub type TokioBlockingExecutorService = TokioExecutorService;