开发者

Is AfxBeginThread safe?

Accor开发者_高级运维ding to this webpage:

To safely use CWinThread, you must start the thread suspended and set the CWinThread object's m_bAutoDelete member to false or DuplicateHandle a copy of its m_hThread member

Does this mean that the AfxBeginThread function is unsafe to use as well?


The documentation you linked seems pretty clear - you can set the CREATE_SUSPENDED flag in the call to AfxBeginThread and set the m_bAutoDelete member before calling CWinThread::ResumeThread, along with any other required initialization. If you do that then it should be perfectly safe.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜