mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
threadpool: add panic_handler (#1052)
This commit is contained in:
@@ -165,6 +165,12 @@ impl Task {
|
||||
// Transition to the completed state
|
||||
self.state.store(State::Complete.into(), Release);
|
||||
|
||||
if let Err(panic_err) = res {
|
||||
if let Some(ref f) = unpark.pool.config.panic_handler {
|
||||
f(panic_err);
|
||||
}
|
||||
}
|
||||
|
||||
Run::Complete
|
||||
}
|
||||
Ok(Ok(Async::NotReady)) => {
|
||||
|
||||
Reference in New Issue
Block a user