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::{
25    ExecutorService,
26    RejectedExecution,
27    ShutdownReport,
28};
29pub use qubit_executor::{
30    TaskExecutionError,
31    TaskHandle,
32    TaskResult,
33};
34pub use thread_pool::{
35    PoolJob,
36    ThreadPool,
37    ThreadPoolBuildError,
38    ThreadPoolBuilder,
39    ThreadPoolStats,
40};
41
42/// Executor service compatibility exports for thread-pool users.
43pub mod service {
44    pub use crate::{
45        ExecutorService,
46        FixedThreadPool,
47        FixedThreadPoolBuilder,
48        PoolJob,
49        RejectedExecution,
50        ShutdownReport,
51        ThreadPool,
52        ThreadPoolBuildError,
53        ThreadPoolBuilder,
54        ThreadPoolStats,
55    };
56}