From 7113fb669dcd193295308c44ee2213aa437e38b2 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sat, 13 Aug 2016 17:43:03 +0200 Subject: [PATCH] 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 --- src/graphics/PreviewLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index 88f49b013e..f3bf437811 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -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;