File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -530,13 +530,13 @@ impl Death {
530
530
531
531
/// Fails if a kill signal was received.
532
532
#[ inline]
533
- pub fn check_killed ( & self ) {
533
+ pub fn check_killed ( & self , already_failing : bool ) {
534
534
match self . kill_handle {
535
535
Some ( ref kill_handle) =>
536
536
// The task may be both unkillable and killed if it does some
537
537
// synchronization during unwinding or cleanup (for example,
538
538
// sending on a notify port). In that case failing won't help.
539
- if self . unkillable == 0 && kill_handle. killed ( ) {
539
+ if self . unkillable == 0 && ( !already_failing ) && kill_handle. killed ( ) {
540
540
fail ! ( KILLED_MSG ) ;
541
541
} ,
542
542
// This may happen during task death (see comments in collect_failure).
Original file line number Diff line number Diff line change @@ -600,7 +600,7 @@ impl Scheduler {
600
600
601
601
// Must happen after running the cleanup job (of course).
602
602
let task = Local :: unsafe_borrow :: < Task > ( ) ;
603
- ( * task) . death . check_killed ( ) ;
603
+ ( * task) . death . check_killed ( ( * task ) . unwinder . unwinding ) ;
604
604
}
605
605
}
606
606
You can’t perform that action at this time.
0 commit comments