recoverable-thread-pool 2.4.19

A thread pool that supports automatic recovery from panics, allowing threads to restart after a panic. Useful for resilient and fault-tolerant concurrency in network and web programming.
Documentation
use crate::*;

/// A thread pool that can execute tasks concurrently.
///
/// Manages a collection of worker threads and provides methods
/// to submit tasks for execution.
///
/// # Returns
///
/// - `ThreadPool` - A new thread pool instance.
#[derive(Debug)]
pub struct ThreadPool {
    /// The collection of worker threads.
    ///
    /// # Returns
    ///
    /// - `Vec<Worker>` - The collection of worker threads.
    #[allow(dead_code)]
    pub(crate) workers: Vec<Worker>,
    /// The sender channel for submitting jobs to workers.
    ///
    /// # Returns
    ///
    /// - `Sender<ThreadPoolJob>` - The sender channel for submitting jobs to workers.
    pub(crate) sender: Sender<ThreadPoolJob>,
}