std::thread
A thread of execution is a sequence of instructions that can be executed concurrently with other such sequences in multithreading environments, while sharing a same address space.
按我的理解:C++标准库中std::thread只是对线程api做了统一的封装,其真实的实现其实是依赖具体的操作系统。在linux/unix中底层依赖pthread, 在windows里面依赖winthread等等。 使用std::thread的好处是你的代码不用改,但是在编译程序的时候依然要链接对应操作系统的库