Boost logo

Boost Users :

Subject: Re: [Boost-users] [thread] safe portable static mutex initialization
From: Roman Perepelitsa (roman.perepelitsa_at_[hidden])
Date: 2012-04-19 02:35:30


2012/4/18 Vicente J. Botet Escriba <vicente.botet_at_[hidden]>

> Le 18/04/12 20:06, Serge Skorokhodov a écrit :
>
> Hello,
>>
>> I've read Anthony Williams' articles and documentation but still have
>> no definite answer. Thus two questions:
>>
>> 1. Is it safe to use a block level static boost::mutex on Unix and
>> Windows?
>> 2. Is it safe to use a file/class level static boost::mutex on Unix and
>> Windows?
>>
>> Hi,
>
> I don't see what kind of problems are your expecting. Could you clarify?
> What do you mean by safe?

I believe Serge is asking whether a zero-initialized mutex is the same as
default-constructed. It also might matter whether mutex has a non-trivial
destructor.

Roman Perepelitsa.



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