开发者

Windows Threading: beginthread or QueueUserWorkItem (C++)

I am wondering whether to use beginthread or QueueUserWorkItem for threaded methods in C++. What are the differences between the two APIs and in what context are they better suited?

Thanks,

BTW, I have read this question W开发者_如何学运维indows threading: _beginthread vs _beginthreadex vs CreateThread C++


QUWI uses a thread from the thread pool to execute the callback function. Such threads are very light weight but not suitable for all types of threaded tasks. Basic requirements are that they need to be relatively short-lived, don't block very often and are not time critical.

It is all rather well explained in the SDK topic.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜