The CRT auto initializes itself as necessary. The only hazard of this a
small memory leak on thread termation (you can prevent this by calling the
CRT cleanup code manually) which is only important of you create / distroy
many threads.
"Joseph Galbraith" <Joseph.G...@nospam.nospam> wrote in message
news:73DB19D4-8D48-41FC...@microsoft.com...
> When using MFC, one must use AfxCreateThread() so that
> MFC gets a chance to setup the thread.
>
> If one is going to use the C RTL but not MFC, one uses beginthreadex
> instead, to let the C RTL initialize the thread.
>
> Presumably, thread pooling functions are not using either one of these
> functions to create threads...
>
> Do my question is this: does this cause problems? If so, is there a
> work-around?
> If not, why not?
>
> Thanks,
>
> Joseph
"m" <m@b.c> wrote in message news:ujvAXBUU...@TK2MSFTNGP12.phx.gbl...
But that not CreateThread() API important to mention , that
CWinThread::CreateThread() which called beginthreadex but only some
some setup and synchronization ( look at thrdcore.cpp of MFC sources ) , so
opposite to Win32 in MFC there is strongly not recommended to call
beginthreadex directly but through AfxBeginThread() only.
If you are in Win32 world the guys already answered you , but you can read
additionally full answer when and how to use both in Win32 world in
http://www.microsoft.com/msj/0799/win32/win320799.aspx
BTW that one of the features I like in Windows CE there is no head-ache of
thread functions ( no CRT ),so CreateThread is the only option :)
>
> I dont understand very well your question, What kind of problems are you
> talking about, mixing creating thread methods?, using C runtime with
> diferent
> methods? usingo MFC with ?
> Explain yourself better so we can help you better :)
That really interesting what is the problem :)
Arkady
"Arkady Frenkel" <ark...@hotmailxdotx.com> wrote in message
news:uhYxpRX...@TK2MSFTNGP10.phx.gbl...
"m" <m@b.c> wrote in message news:ujvAXBUU...@TK2MSFTNGP12.phx.gbl...
Ok you can design your own thread pool, your own thread mecanism, but
was is the cost. Do you think it will be better (perfomance/design).
When I need to code quickly, I reuse the ATL Server templates. There
are very smart to use.
Hope it helps.
Regards, Christophe Pichaud.
"Alexander Grigoriev" <al...@earthlink.net> wrote in message
news:ezzKjbbU...@TK2MSFTNGP14.phx.gbl...
"chpichaud" <christop...@hotmail.com> wrote in message
news:1143475723.5...@j33g2000cwa.googlegroups.com...