开发者

_beginthread vs CreateThread

开发者 https://www.devze.com 2022-12-16 19:37 出处:网络
What is the difference bet开发者_运维技巧ween CreateThread and beginthread APIs in Windows? Which one is preferrable for thread creation?_beginthread() and _beginthreadex() was required by earlier ver

What is the difference bet开发者_运维技巧ween CreateThread and beginthread APIs in Windows? Which one is preferrable for thread creation?


_beginthread() and _beginthreadex() was required by earlier versions of the Microsoft CRT to initialize thread-local state. The strtok() function would be an example. That's been fixed, that state now gets dynamically initialized, at least since VS2005. Using CreateThread() no longer causes problems.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号