Comment

Comment by zabzonk

Static variable initialisation that is not initialisation of such variables local to functions is performed before the program starts running, so there cannot be multiple threads.

I can't remember the case in C, but in C++ the initialisation of a function local static variable is guaranteed to be thread-safe.

parent zabzonk 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton