|
Boost Users : |
Subject: Re: [Boost-users] [Thread] Win32 TLS problem with dynamic libraries
From: Sarah Tappon (sarah_tappon_at_[hidden])
Date: 2012-11-01 21:10:14
On Mon, Oct 29, 2012 at 12:31 AM, СеÑгей ÐаÑ
аÑÑенко wrote:
> * Rename the Boost.Thread library into 'original_boost_thread'.
>
> * Add a custom target named 'patched_boost_thread' which uses dumpbin
> and lib utilities to delete just the tss_pe.obj object from Boost.Thread.
>
> * Add a library called boost_thread which links to 'patched_boost_thread' and
> contains a file named tss_pe.cpp which contains the aforementioned code
> (essentially it's the 'null tss cleanup implementation').
I've been researching a similar issue and it's useful to hear from
someone who has successfully implemented a workaround. A couple of
follow-up questions, if you don't mind:
Once the solution is in place, what (if anything) do you have to do to
ensure that resources are cleaned up appropriately? Is it sufficient
to call on_thread_exit() whenever a thread exits?
> Assuming that I can guarantee that no Boost.Thread functions
> are called from non-Boost.Thread threads, it shouldn't be
> needed.
Could you give me a concrete example of a call that would violate this
guarantee? What happens if you violate it?
Thanks,
Sarah
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