diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index 1db47a41..f5414e35 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -350,10 +350,18 @@ namespace netgen */ // add lock-free to list + /* surfelements[sei].next = facedecoding[el.index-1].firstelement; auto & head = reinterpret_cast&> (facedecoding[el.index-1].firstelement); while (!head.compare_exchange_weak (surfelements[sei].next, sei)) ; + */ + surfelements[sei].next = facedecoding[el.index-1].firstelement; + auto & head = reinterpret_cast&> (facedecoding[el.index-1].firstelement); + auto & next = reinterpret_cast (surfelements[sei].next); + while (!head.compare_exchange_weak (next, sei)) + ; + /* if (SurfaceArea().Valid())