What is the difference between CreateThread and beginthread APIs in Windows? Which one is preferrable for thread creation?
Windows – _beginthread vs CreateThread
cmultithreadingwindows
Related Topic
- The difference between a process and a thread
- Windows – n equivalent of ‘which’ on the Windows command line?
- C# – How to update the GUI from another thread
- Java – Difference between wait() and sleep()
- Php – thread safe or non-thread safe in PHP
- Sqlite – Improve INSERT-per-second performance of SQLite
- Java – How do servlets work? Instantiation, sessions, shared variables and multithreading
- C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming
Best Answer
_beginthread()
and_beginthreadex()
was required by earlier versions of the Microsoft CRT to initialize thread-local state. Thestrtok()
function would be an example. That's been fixed, that state now gets dynamically initialized, at least since VS2005. UsingCreateThread()
no longer causes problems.