CreateThread与_beginthread的区别(国外英文资料).docVIP

  • 9
  • 0
  • 约 25页
  • 2017-06-05 发布于河南
  • 举报

CreateThread与_beginthread的区别(国外英文资料).doc

CreateThread与_beginthread的区别(国外英文资料)

CreateThread与_beginthread的区别 For example, if you use _beginthread, you cant create a new thread with security properties, you cant create a pause thread, and you cant get the threads ID value. Here is an excerpt from Holly () in Csdn, and thanks again. Source: /t10/31810.html Holly () : Oldworm provides an example of good use, and it also USES compile control! Let me explain the theoretical difference: CreateThread, _beginthread and _beginthreadex are used to start a thread, but, the way people see oldworm provided no _beginthread reason is simple, is _beginthread _beginthreadex subset of the functionality, although _beginthread internal is called _beginthreadex but he blocked the function, such as security features, so the _beginthread and CreateThread is not the same level, _beginthreadex and CreateThread completely alternative on the function, we compare the _beginthreadex and CreateThread! CRT libraries in thread before already exists, so the original CRT doesnt really support thread, this leads to us at the time of programming the choice of the CRT library, in the MSDN refer to CRT functions are: Libraries LIBC. LIB Single thread static library, retail version LIBCMT. LIB Multithread static library, retail version The msvcrt.lib Import library for msvcrt.dll Such a hint! Support for threads is later! This also causes many CRT functions to have special support in multi-threaded situations, not simply using CreateThread. Most of the CRT functions can be used in the CreateThread thread, which means that only the signal () function is not allowed to cause the process to terminate! But that doesnt mean theres no problem! Some of CRT functions like malloc (), fopen (), _open (), strtok (), ctime (), or a localtime () function requires a dedicated thread local storage data block, this block of data is often needed when create a thread to set up, if use CreateThread, the block of data, there is no established, then? In this thread and there is no error, or yo

文档评论(0)

1亿VIP精品文档

相关文档