Boost logo

Boost :

Subject: Re: [boost] MinGW's last thread/tss problem: fixable?
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2010-11-10 05:01:28


Jim Bell <Jim_at_[hidden]> writes:

> Thread is still failing test_tss_lib, now with this...
> ../libs/thread/test/test_tss.cpp(181): error in "test_tss": Support of
> automatic tss cleanup for native threading API not available
>
> If I understand this correctly, the tss cleanup will never be called for
> a thread created via the native API. There's no global function that can
> force a clean-up because nothing can force the underlying thread
> mechanism to return the thread-specific value for a thread that's
> already exited.

That's right.

> I see some subtle magic in libs/thread/src/win32/tss_pe.cpp, some even
> for __MINGW32_...
>
> Is this for static libs? Any chance we can make that work for MinGW's
> gcc-4.3.3 and gcc-4.4.0?

This is supposed to work :-(

It works with mingw-gcc-4.5 (which is what I have), and it used to work
with whatever version I used to have on my old Windows box.

> Also, I think the docs need a "Note" section describing this issue, say
> thread_local_storage.html, inside the section "Cleanup at thread exit".

OK.

Anthony

-- 
Author of C++ Concurrency in Action     http://www.stdthread.co.uk/book/
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 list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk