Rollup merge of #21325 - nagisa:thread-panicking, r=steveklabnik

Previous wording wasn’t clear about its actual behaviour. It could be
interpreted as answering either:

* Can current thread panic?
* Is current thread unwinding because of panic?

r? @steveklabnik
This commit is contained in:
Steve Klabnik 2015-01-22 18:09:58 -05:00
commit 3364d41282
2 changed files with 2 additions and 2 deletions

View File

@ -152,7 +152,7 @@ pub unsafe fn try<F: FnOnce()>(f: F) -> Result<(), Box<Any + Send>> {
}
}
/// Test if the current thread is currently panicking.
/// Determines whether the current thread is unwinding because of panic.
pub fn panicking() -> bool {
PANICKING.with(|s| s.get())
}

View File

@ -382,7 +382,7 @@ impl Thread {
unsafe { imp::yield_now() }
}
/// Determines whether the current thread is panicking.
/// Determines whether the current thread is unwinding because of panic.
#[inline]
#[stable]
pub fn panicking() -> bool {