diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-17 14:59:20 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-12-18 23:35:52 -0800 |
| commit | d08600b189eeb2e61879b44a07f9fdc33fa82689 (patch) | |
| tree | 274743c02df19bff0de04f5c9098f8c280d29c23 /src/libstd/thread.rs | |
| parent | 5759cff48e66bcf2bf2cf821211bdf683292d8f3 (diff) | |
| download | rust-d08600b189eeb2e61879b44a07f9fdc33fa82689.tar.gz rust-d08600b189eeb2e61879b44a07f9fdc33fa82689.zip | |
std: Move the panic flag to its own thread local
This flag is somewhat tied to the `unwind` module rather than the `thread_info` module, so this commit moves it into that module as well as allowing the same OS thread to call `unwind::try` multiple times. Previously once a thread panicked its panic flag was never reset, even after exiting the panic handler.
Diffstat (limited to 'src/libstd/thread.rs')
| -rw-r--r-- | src/libstd/thread.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index 6c6c0ce85eb..8ef53a22aeb 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -327,7 +327,7 @@ impl Thread { /// Determines whether the current thread is panicking. pub fn panicking() -> bool { - thread_info::panicking() + unwind::panicking() } /// Block unless or until the current thread's token is made available (may wake spuriously). |
