Boost logo

Boost :

Subject: Re: [boost] [thread] thread_specific_ptr leaks on VS2012 when using std::async()
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-03-04 17:46:38


Le 05/09/12 10:33, Klaim - Joël Lamotte a écrit :
> I attach the whole email exchange to this email, tell me if leak logs are
> necessary too.
>
> The last version of my test is at the end of the email (first program).
> Basically, the leak appear only when using std::async() in combination of
> boost::thread_specific_ptr :
> - using exclusively boost threading libraries (both with dynamic and
> static linking) result in no leak
> - using exclusively std threading libraries but not std::async() result in
> no leak
> - using std::async() result in a leak
>
> The second test program shows that using Intel Threading Building Blocks, I
> get leaks only if :
> - I use std::async() in combination with boost::thread_specific_ptr, as
> before (I mean I use tbb without a leak, then I add a std::async() call to
> the same task function and there is a leak)
> - I don't use std::async() but I don't manage the lifetime of tbb task
> scheduler
>
> We think the threads spawned by both tbb (that is supposed to be a superset
> of ppl) and std::async() (that is supposed to use ppl/concrt task
> scheduler) are not ended yet
> when the program reach the end of main (which seems logical as the task
> scheduler is then managed as a static global),
>

Shouldn't the future destructor synchronize with the hidden thread used
by std::async()?

Best,
Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk