mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
threadpool: add panic_handler (#1052)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use callback::Callback;
|
||||
|
||||
use std::any::Any;
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
@@ -14,6 +15,7 @@ pub(crate) struct Config {
|
||||
pub around_worker: Option<Callback>,
|
||||
pub after_start: Option<Arc<Fn() + Send + Sync>>,
|
||||
pub before_stop: Option<Arc<Fn() + Send + Sync>>,
|
||||
pub panic_handler: Option<Arc<Fn(Box<Any + Send>) + Send + Sync>>,
|
||||
}
|
||||
|
||||
/// Max number of workers that can be part of a pool. This is the most that can
|
||||
|
||||
Reference in New Issue
Block a user