From 53188690251b5724dd990e5e9eae4ff2e6dcde46 Mon Sep 17 00:00:00 2001 From: Light-City <455954986@qq.com> Date: Sat, 1 Feb 2020 09:20:20 +0800 Subject: [PATCH] update --- README.md | 39 +- .../.idea/Threading_In_CPlusPlus.iml | 2 + Threading_In_CPlusPlus/.idea/misc.xml | 7 + Threading_In_CPlusPlus/.idea/modules.xml | 8 + Threading_In_CPlusPlus/.idea/workspace.xml | 510 ++++++++++++++++++ Threading_In_CPlusPlus/1.thread/intro.cpp | 41 ++ Threading_In_CPlusPlus/1.thread/thread.cpp | 56 ++ .../2.create_type/1.function_pointer.cpp | 23 + .../2.create_type/2.lambda_function.cpp | 31 ++ .../2.create_type/3.functor.cpp | 25 + .../4.no_static_member_function.cpp | 26 + .../5.static_member_function.cpp | 25 + .../3.join_detach/detach.cpp | 34 ++ Threading_In_CPlusPlus/3.join_detach/join.cpp | 35 ++ .../4.mutex/critical_section.cpp | 34 ++ Threading_In_CPlusPlus/CMakeLists.txt | 16 + 16 files changed, 900 insertions(+), 12 deletions(-) create mode 100644 Threading_In_CPlusPlus/.idea/Threading_In_CPlusPlus.iml create mode 100644 Threading_In_CPlusPlus/.idea/misc.xml create mode 100644 Threading_In_CPlusPlus/.idea/modules.xml create mode 100644 Threading_In_CPlusPlus/.idea/workspace.xml create mode 100644 Threading_In_CPlusPlus/1.thread/intro.cpp create mode 100644 Threading_In_CPlusPlus/1.thread/thread.cpp create mode 100644 Threading_In_CPlusPlus/2.create_type/1.function_pointer.cpp create mode 100644 Threading_In_CPlusPlus/2.create_type/2.lambda_function.cpp create mode 100644 Threading_In_CPlusPlus/2.create_type/3.functor.cpp create mode 100644 Threading_In_CPlusPlus/2.create_type/4.no_static_member_function.cpp create mode 100644 Threading_In_CPlusPlus/2.create_type/5.static_member_function.cpp create mode 100644 Threading_In_CPlusPlus/3.join_detach/detach.cpp create mode 100644 Threading_In_CPlusPlus/3.join_detach/join.cpp create mode 100644 Threading_In_CPlusPlus/4.mutex/critical_section.cpp create mode 100644 Threading_In_CPlusPlus/CMakeLists.txt diff --git a/README.md b/README.md index 6612bc4..ac8f1c6 100644 --- a/README.md +++ b/README.md @@ -137,9 +137,22 @@ - [myhashtable](./stl_src/myhashtable.md) - [unordered_map](./stl_src/unordered_map.md) -### 3.学习课程 +## 3.多线程与多进程 -#### 3.1 [极客时间《现代C++实战30讲》](https://time.geekbang.org/channel/home) +### 3.1 Threading In C++ + +- [介绍](./Threading_In_CPlusPlus/1.thread) +- [创建线程的五种类型](./Threading_In_CPlusPlus/2.create_type) +- [Join与Detachs](./Threading_In_CPlusPlus/3.join_detach) +- [mutex in C++ Threading](./Threading_In_CPlusPlus/4.mutex) + +> 学习自: +> +> https://www.youtube.com/watch?v=eZ8yKZo-PGw&list=PLk6CEY9XxSIAeK-EAh3hB4fgNvYkYmghp&index=4 + +### 4.学习课程 + +#### 4.1 [极客时间《现代C++实战30讲》](https://time.geekbang.org/channel/home) - [堆、栈、RAII:C++里该如何管理资源?](./modern_C++_30/RAII) - [堆](./modern_++_30/RAII/heap.cpp) @@ -166,9 +179,9 @@ - [constexpr:一个常态的世界](./modern_C++_30/constexpr) - [函数对象和lambda:进入函数式编程](./modern_C++_30/functionLambda) -### 4.拓展部分 +### 5.拓展部分 -#### 4.1 [C++惯用法](./codingStyleIdioms) +#### 5.1 [C++惯用法](./codingStyleIdioms) ##### 你最喜欢的c++编程风格惯用法是什么? @@ -178,11 +191,11 @@ - [4.copy and swap](./codingStyleIdioms/4_copy-swap) - [5.pImpl(指针指向具体实现)](./codingStyleIdioms/5_pImpl) -#### 4.2 一些问题 +#### 5.2 一些问题 - [C++中如何将string类型转换为int类型?](./basic_content/extent/string_int.md) -### 5.工具篇 +### 6.工具篇 - [容器快捷输出工具](./tool/output) @@ -205,22 +218,24 @@ ``` - 像Python一样简单输出 - - [像Python一样玩C/C++](./tool/像Python一样玩CC++.md) - + +- [像Python一样玩C/C++](./tool/像Python一样玩CC++.md) + - 观察编译过程变化 + - [https://cppinsights.io](https://cppinsights.io/) -### 6.代码运行 +### 7.代码运行 - **代码环境** -Ubuntu 18.04 + Ubuntu 18.04 - **工具** -CLion gcc/g++ + CLion gcc/g++ -### 7.关于作者 +### 8.关于作者 个人公众号: diff --git a/Threading_In_CPlusPlus/.idea/Threading_In_CPlusPlus.iml b/Threading_In_CPlusPlus/.idea/Threading_In_CPlusPlus.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/Threading_In_CPlusPlus/.idea/Threading_In_CPlusPlus.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Threading_In_CPlusPlus/.idea/misc.xml b/Threading_In_CPlusPlus/.idea/misc.xml new file mode 100644 index 0000000..8822db8 --- /dev/null +++ b/Threading_In_CPlusPlus/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/Threading_In_CPlusPlus/.idea/modules.xml b/Threading_In_CPlusPlus/.idea/modules.xml new file mode 100644 index 0000000..93828d7 --- /dev/null +++ b/Threading_In_CPlusPlus/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Threading_In_CPlusPlus/.idea/workspace.xml b/Threading_In_CPlusPlus/.idea/workspace.xml new file mode 100644 index 0000000..648a701 --- /dev/null +++ b/Threading_In_CPlusPlus/.idea/workspace.xml @@ -0,0 +1,510 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +