BHO / ATL / COM中的线程。 Winapi还是别的什么? [英] Threading in BHO/ATL/COM. Winapi or something else?
问题描述
我编写IE加载项,我正在使用ATL。我需要创建后台工作线程,所以UI线程将尽快解除阻塞。
我的问题是,我应该使用最低的方式创建线程是Winapi, CreateThread 等)。
< ?
我必须首先学习这个东西,所以我想我会先问:)
除非您需要提供的控制级别,否则不需要使用低级API。
使用ATL,您已拥有 CWorkerThread
,但您也可以使用其他库,例如 Boost.Thread 。
I writing IE add-on and I'm using ATL for it. I need to create background worker thread so UI thread will be unblocked as soon as possible. My question is, should I use the lowest possible way of creating thread which is Winapi, CreateThread etc.
Or is there other proffered way of creating worker thread in BHO/ATL/COM projects?
I have to learn this stuff first so I thought I would ask first ;)
There is no need to use low-level APIs unless you need the level of control they offer.
With ATL you already have CWorkerThread
, but you could also use other libraries like Boost.Thread if you prefer.
这篇关于BHO / ATL / COM中的线程。 Winapi还是别的什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!