|
Boost Users : |
Subject: Re: [Boost-users] filesystem::path threadsafe ?? (1.48) Options
From: Rob Riggs (rob_at_[hidden])
Date: 2011-12-27 10:46:31
On 12/27/2011 06:49 AM, Wolfgang Fertsak wrote:
> On 23.12.2011 16:45, Aris Basic wrote:
>> Here is the sample code that crashes every time
>
>
> I think the problem is in file filesystem/v3/source/path.cpp in method
>
> const path::codecvt_type *& path::wchar_t_codecvt_facet()
> {
> static const std::codecvt<wchar_t, char, std::mbstate_t> *
> facet(
> &std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t> >
> (path_locale()));
> return facet;
> }
>
> This method is entered by multiple threads concurrently and the static
> pointer "facet" gets initialized by the first thread (which takes some
> time) but the other threads don't wait and just continue while facet
> is a NULL pointer.
That's great detective work, Wolfgang. Please file a Trac ticket with
this information so that the maintainers can get this fixed. This seems
like a serious regression.
Rob
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