diff --git a/zh/chapter3-Thread/Introduction-to-Thread.md b/zh/chapter3-Thread/Introduction-to-Thread.md index ebf1de6..3cc5e28 100644 --- a/zh/chapter3-Thread/Introduction-to-Thread.md +++ b/zh/chapter3-Thread/Introduction-to-Thread.md @@ -468,7 +468,7 @@ thread& operator=(const thread&) = delete; t2.join(); } -- yield: 当前线程放弃执行,操作系统调度另一线程继续执行。 +- yield: 当前线程放弃执行,操作系统调度另一线程继续执行,一般地,系统是会调度另一个相同优先级的线程继续执行,如果当前优先级只有这一个线程,那么yield()没有作用,此时下面的代码输出就还是100。 #include #include @@ -524,4 +524,4 @@ thread& operator=(const thread&) = delete; 执行结果如下: Hello waiter - Waited 2000 ms \ No newline at end of file + Waited 2000 ms