diff options
| author | bors <bors@rust-lang.org> | 2018-04-04 06:19:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-04-04 06:19:40 +0000 |
| commit | 5758c2dd14fd29caf7c7bb2123eb6b23443b9233 (patch) | |
| tree | 00119e47d0be6aa30215fd510a06a2fde63dd937 /src/libstd/sys_common | |
| parent | 20338a52401bda3024fd91010a143913a8dc9a6c (diff) | |
| parent | 7db854b36f9598e44fb4d61428d42d7769233e19 (diff) | |
| download | rust-5758c2dd14fd29caf7c7bb2123eb6b23443b9233.tar.gz rust-5758c2dd14fd29caf7c7bb2123eb6b23443b9233.zip | |
Auto merge of #48575 - ishitatsuyuki:unix-no-thread, r=alexcrichton
rustc_driver: get rid of the extra thread **Do not rollup** We can alter the stack size afterwards on Unix. Having a separate thread causes poor debugging experience when interrupting with signals. I have to get the backtrace of the all thread, as the main thread is waiting to join doing nothing else. This patch allows me to just run `bt` to get the desired backtrace.
Diffstat (limited to 'src/libstd/sys_common')
| -rw-r--r-- | src/libstd/sys_common/thread_info.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/sys_common/thread_info.rs b/src/libstd/sys_common/thread_info.rs index 6a2b6742367..d75cbded734 100644 --- a/src/libstd/sys_common/thread_info.rs +++ b/src/libstd/sys_common/thread_info.rs @@ -50,3 +50,7 @@ pub fn set(stack_guard: Option<Guard>, thread: Thread) { thread, })); } + +pub fn reset_guard(stack_guard: Option<Guard>) { + THREAD_INFO.with(move |c| c.borrow_mut().as_mut().unwrap().stack_guard = stack_guard); +} |
