1

I cannot find any information about thread-safety of OpenMesh operations, specifically I'm looking for a multithreaded mesh importing. Currently I'm filling my mesh through:

OpenMesh::IO::ImporterT

In single thread. But if it's possible - I wan't to do this operation in multiple threads, without blocking around:

meshImporter.add_face(faceHandle);
meshImporter.add_vertex(vertex);

But it's a little bit slower than I thought (It consumes more than half of time of next operation - decimation the of same mesh).

Ibraim Ganiev
  • 8,934
  • 3
  • 33
  • 52

1 Answers1

2

None of the OpenMesh data structures offer thread-safe modification. Operations such as add_face or add_vertex need to update indices of other element types to keep the data structure in a consistent state. Calling these methods concurrently on the same mesh can thus result in corrupted mesh data.

Since OpenMesh::IO::ImporterT mostly forwards its calls to an underlying mesh, the same restrictions apply: All updates to an OpenMesh must be synchronized.

jsb
  • 938
  • 6
  • 15