Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost thread conflicts with MFC
From: Igor MI (kostadinovigor_at_[hidden])
Date: 2009-04-09 03:59:58


Is it safe to comment it out? I mean I know I will lose some memory resources
and thats fine by me, are there any other side effects of commenting this
hook?

Anthony Williams-4 wrote:
>
> Igor MI <kostadinovigor_at_[hidden]> writes:
>
>> I updated from 1.35 to 1.38 when the conflicts started. My MFC
>> application
>> wouldn't start, it would throw an exception. I pinned down the problem to
>> the hook that boost thread library is using which is located in
>> tss_pe.cpp:
>>
>> extern "C"
>> {
>> extern BOOL (WINAPI * const _pRawDllMain)(HANDLE, DWORD,
>> LPVOID)=&dll_callback;
>> }
>>
>> What I did is comment this declaration and rebuild the library and now my
>> application seems to be running normally. My question is can boost thread
>> library run properly without this hook? If not, what other solution do
>> you
>> suggest.
>
> This hook is necessary when using static-linked boost.thread in a DLL,
> in order to ensure that the thread-specific data allocated for each
> thread is cleaned up.
>
> I have been sent a patch to handle this case, and will try and integrate
> it into boost.thread sometime soon.
>
> Anthony
> --
> Author of C++ Concurrency in Action | http://www.manning.com/williams
> just::thread C++0x thread library | http://www.stdthread.co.uk
> Just Software Solutions Ltd |
> http://www.justsoftwaresolutions.co.uk
> 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>

-- 
View this message in context: http://www.nabble.com/Boost-thread-conflicts-with-MFC-tp22946168p22966177.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net