From 4610cac82b50854ea55a6c773f65f1de44581607 Mon Sep 17 00:00:00 2001 From: glud123 Date: Wed, 26 Jan 2022 11:55:13 +0800 Subject: [PATCH] fix: typo --- book/contents/basic/result-error/panic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/contents/basic/result-error/panic.md b/book/contents/basic/result-error/panic.md index 79d7a997..d63e4fb9 100644 --- a/book/contents/basic/result-error/panic.md +++ b/book/contents/basic/result-error/panic.md @@ -88,7 +88,7 @@ note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose bac panic = 'abort' ``` -## 线程`panic`后,程序会否终止? +## 线程`panic`后,程序是否会终止? 长话短说,如果是 `main` 线程,则程序会终止,如果是其它子线程,该线程会终止,但是不会影响 `main` 线程。因此,尽量不要在 `main` 线程中做太多任务,将这些任务交由子线程去做,就算子线程 `panic` 也不会导致整个程序的结束。 具体解析见[panic原理剖析](#panic原理剖析)