我在一次 C++ 开发人员职位面试中被问到这个问题,这个问题的答案是什么?
最佳答案
我会说:
If I wanted to create a portable cross-platform C++ binary, I'd use pthreads and use the pthread implementation for windows. If I wanted to create a windows-specific C++ binary, I'd use beginthread and avoid the 3rd party dependency on the pthread library.
如果他们真的想知道描述两者之间差异的复杂内部细节,那么您应该三思而后行。除非是逆向工程工作。
关于c++ - 采访 : what is the difference between pthread and windows thread created by _beginthread(ex)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5345058/