Skip to main content

qubit_thread_pool/
lib.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2025 - 2026.
4 *    Haixing Hu, Qubit Co. Ltd.
5 *
6 *    All rights reserved.
7 *
8 ******************************************************************************/
9//! # Qubit Thread Pool
10//!
11//! Dynamic and fixed-size thread pool executor services.
12//!
13//! # Author
14//!
15//! Haixing Hu
16
17mod fixed_thread_pool;
18mod thread_pool;
19mod worker_queue;
20
21pub use fixed_thread_pool::{
22    FixedThreadPool,
23    FixedThreadPoolBuilder,
24};
25pub use qubit_executor::service::{
26    ExecutorService,
27    RejectedExecution,
28    ShutdownReport,
29};
30pub use qubit_executor::{
31    TaskExecutionError,
32    TaskHandle,
33    TaskResult,
34};
35pub use thread_pool::{
36    PoolJob,
37    ThreadPool,
38    ThreadPoolBuildError,
39    ThreadPoolBuilder,
40    ThreadPoolStats,
41};
42
43/// Executor service compatibility exports for thread-pool users.
44pub mod service {
45    pub use crate::{
46        ExecutorService,
47        FixedThreadPool,
48        FixedThreadPoolBuilder,
49        PoolJob,
50        RejectedExecution,
51        ShutdownReport,
52        ThreadPool,
53        ThreadPoolBuildError,
54        ThreadPoolBuilder,
55        ThreadPoolStats,
56    };
57}