Skip to main content

qubit_thread_pool/
lib.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 *    SPDX-License-Identifier: Apache-2.0
6 *
7 *    Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! # Qubit Thread Pool
11//!
12//! Dynamic and fixed-size thread pool executor services.
13//!
14
15mod fixed_thread_pool;
16mod fixed_thread_pool_builder;
17mod queue_steal_source;
18mod thread_pool;
19mod worker_queue;
20mod worker_runtime;
21
22pub use fixed_thread_pool::FixedThreadPool;
23pub use fixed_thread_pool_builder::FixedThreadPoolBuilder;
24pub use qubit_executor::service::{ExecutorService, RejectedExecution, ShutdownReport};
25pub use qubit_executor::{TaskExecutionError, TaskHandle, TaskResult};
26pub use thread_pool::{
27    PoolJob, ThreadPool, ThreadPoolBuildError, ThreadPoolBuilder, ThreadPoolStats,
28};
29
30/// Executor service compatibility exports for thread-pool users.
31pub mod service {
32    pub use crate::{
33        ExecutorService, FixedThreadPool, FixedThreadPoolBuilder, PoolJob, RejectedExecution,
34        ShutdownReport, ThreadPool, ThreadPoolBuildError, ThreadPoolBuilder, ThreadPoolStats,
35    };
36}