From 7c88a6da76f94b78eeb92a55be7fd482eca576aa Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Mon, 16 Sep 2019 13:13:48 +0200 Subject: [PATCH] Lock mesh in Mesh::Compress --- libsrc/meshing/meshclass.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index cb9f8ae7..41d67d0c 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -3257,6 +3257,8 @@ namespace netgen void Mesh :: Compress () { static Timer t("Mesh::Compress"); RegionTimer reg(t); + NgLock lock(mutex); + lock.Lock(); NgArray op2np(GetNP()); NgArray hpoints; @@ -3415,6 +3417,7 @@ namespace netgen // FindOpenElements(); timestamp = NextTimeStamp(); + lock.UnLock(); } void Mesh :: OrderElements()