Re: Full disable of C++20 time zone support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Jun 2023 at 10:27, Alexey Lapshin
<alexey.lapshin@xxxxxxxxxxxxx> wrote:
>
> On Thu, 2023-06-29 at 10:23 +0100, Jonathan Wakely wrote:
> > That macro isn't even defined until later in the file, so would never
> > be defined at this point.
>
> Was a simplified example.
>
>
> Why do you still need to have some mutexes or whatever in case TZDB_DISABLED?

Because there is still a global object that needs to be lazily
constructed, and multiple threads can try to access it concurrently.

> > It should always be possible to call
> std::chrono::get_tzdb() even if the tzdb only contains the UTC time
> zone.
>
> Just return NULL in case TZDB_DISABLED?

It returns a reference.

As I said (and you quoted above), the intention is to return a valid
object that contains the UTC time zone. That is a graceful failure for
missing tzdata, not a crash.



>
> Thanks



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux