DiscussionsIssue archiveOther usage issues

Archived discussion

Thread safety of OCC?

Other usage issuesWed, 12/18/2013 - 00:581 reply

Browse this forum
QuestionAuthor

I'm running operations like BRepMesh_IncrementalMesh on different shapes from different threads simultaneously, and occasionally getting access violation exceptions when doing so; said errors don't happen often and don't seem to over occur when I use only one thread to call said functions, which leads me to believe that I'm encountering some sort of race condition within OCC code. I have already experimented with turning the memory manager off, and turning it on but with re-entrant mode on; the same problems persist no matter what settings I use.

I should note all the shapes are from the same file when this occurs, if that makes any difference e.g. if a shared edge might be causing the issue. Is there any documentation on which functions are thread-safe in OCC 6.6.0?

Discussion

1 archived reply

Posts are displayed in their archived order.

01Commenter-1

In my app, I also use BRepMesh_IncrementalMesh to tessellate shapes using multi-threads and no exception found yet.
But when I use BRepOffsetAPI_MakeFilling to create lots of surfaces from edges using multi-threads, it always cause crash.
So I guess BRepOffsetAPI_MakeFilling is not thread-safe.