Skip to content

Commit 541ab0d

Browse files
authored
Merge pull request #1 from CrossroadW/CrossroadW-patch-1
修改print_task打印线程id,Update 04线程池.md
2 parents f2d31f4 + 1d2acea commit 541ab0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
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)