Correct comment

According to C++11 rules, static locals are thread safe for
the first-time initialization.

See also:
http://stackoverflow.com/questions/12302057/c11-safe-double-checked-locking-for-lazy-initialization-possible
This commit is contained in:
Enrico Forestieri 2016-08-13 17:43:03 +02:00
parent 02b747396e
commit 7113fb669d

View File

@ -102,7 +102,7 @@ lyx::Converter const * setConverter(string const & from)
<< "\" format has been defined.");
});
#else
// This is not thread-safe.
// This is also thread-safe according to §6.7.4 of the C++11 standard.
static bool first = true;
if (first) {
first = false;