> For the complete documentation index, see [llms.txt](https://chenxiaowei.gitbook.io/concurrency-with-modern-c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chenxiaowei.gitbook.io/concurrency-with-modern-c/xiang-xi-jie-shao/2.0-chinese.md).

# 多线程

C++11添加了多线程接口，为创建多线程程序提供了基础件。多线程的基础件有：线程、共享数据(如互斥锁和锁)的同步原语、线程本地数据、线程(如条件变量)的同步机制和任务。任务(通常称为promise和future)会提供了比线程更高级的抽象。

![](https://3363967912-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-KSxRXRnFDvJFxhKXQ%2F-M-O1pONusgSdN2vkPsx%2F-M-O1q8NFKDwKV9chFrw%2F1.png?generation=1580968142278938\&alt=media)
