until the stack is unwound and the task transitions to the *dead*
state. There is no way to "recover" from task failure. Once a task has
temporarily suspended its unwinding in the *failing* state, failure
-occurring from within this destructor results in *hard* failure. The
-unwinding procedure of hard failure frees resources but does not execute
-destructors. The original (soft) failure is still resumed at the point where
-it was temporarily suspended.
+occurring from within this destructor results in *hard* failure.
+A hard failure currently results in the process aborting.
A task in the *dead* state cannot transition to other states; it exists
only to have its termination status inspected by other tasks, and/or to await
}
if (*task).unwinder.unwinding {
- rtabort!("unwinding again");
+ // If a task fails while it's already unwinding then we
+ // have limited options. Currently our preference is to
+ // just abort. In the future we may consider resuming
+ // unwinding or otherwise exiting the task cleanly.
+ rterrln!("task failed during unwinding (double-failure - total drag!)")
+ rterrln!("rust must abort now. so sorry.");
+ intrinsics::abort();
}
}