关于task和thread的疑问
在《Intel Threading Building Blocks》一书中,有一段:
“
Another advantage of tasks versus logical threads is that tasks are much lighter
weight. On Linux systems, starting and terminating a task is about 18 times faster
than starting and terminating a thread. On Windows systems, the ratio is more than
100-fold.
”
这里说在启动和终止一个task或thread,task的效率是thread的18(linux)或100(Windows)倍,
我查了一下资料,基本上都说task是跟process对应的,而在我的印象中启动或终止一个进程应该比线程效率低,
不知道是不是我对task,process,thread三者的概念理解错了,请高手指教,谢谢!