recoverable_thread_pool/
lib.rs

1//! recoverable-thread-pool
2//!
3//! A thread pool that supports automatic recovery from panics,
4//! allowing threads to restart after a panic. Useful for resilient
5//! and fault-tolerant concurrency in network and web programming.
6
7mod thread_pool;
8mod worker;
9
10pub use {thread_pool::*, worker::*};
11
12use std::{
13    sync::{
14        Arc, Mutex,
15        mpsc::{self, Receiver, SendError, Sender},
16    },
17    thread::spawn,
18};
19#[cfg(test)]
20use std::{thread::sleep, time::Duration};
21
22use {recoverable_spawn::*, tokio::runtime::Builder};