Skip to content

Commit 1d2acea

Browse files
authored
修改print_task打印线程id,Update 04线程池.md
修改print_task打印线程id,Update 04线程池.md
1 parent f2d31f4 commit 1d2acea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

md/详细分析/04线程池.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ graph TD
9797
#include <iostream>
9898

9999
void print_task(int n) {
100-
std::cout << "Task " << n << " is running." << std::endl;
100+
std::cout << "Task " << n << " is running on thr: "
101+
<< std::this_thread::get_id() << std::endl;
101102
}
102103

103104
int main() {

0 commit comments

Comments
 (0)