From 4fba30519774a0d2232e87315df3c3b8c5abf620 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Fri, 8 Dec 2023 02:32:23 +1000 Subject: [PATCH] XML library initialisation is not thread safe (#272) Note that calling XMLPlatformUtils::Initialize is currently not thread safe Co-authored-by: Nigel Stewart --- src/E57XmlParser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/E57XmlParser.cpp b/src/E57XmlParser.cpp index 3908823..78444ed 100644 --- a/src/E57XmlParser.cpp +++ b/src/E57XmlParser.cpp @@ -285,6 +285,8 @@ void E57XmlParser::init() // Initialize the XML4C2 system try { + // NOTE: This is not thread safe for multiple simulaneous E57 readers. + // Ideally we'd do this once, not once per reader XMLPlatformUtils::Initialize(); } catch ( const XMLException &ex )