Skip to content

Commit 9662762

Browse files
Merge pull request #120 from Geode-solutions/perf/aabb-async
fix(OpenGeode): add mutex in intersection detection
2 parents 79b121c + 9d0359f commit 9662762

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/geode/inspector/criterion/intersections/model_intersections.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ namespace
176176

177177
void emplace( geode::index_t p1_id, geode::index_t p2_id )
178178
{
179+
std::lock_guard< std::mutex > lock( mutex_ );
179180
intersecting_polygons_.emplace_back( p1_id, p2_id );
180181
}
181182

@@ -207,6 +208,7 @@ namespace
207208
const geode::SurfaceMesh< Model::dim >& mesh2_;
208209
std::vector< std::pair< geode::index_t, geode::index_t > >
209210
intersecting_polygons_;
211+
std::mutex mutex_;
210212
};
211213

212214
template < typename Model >

0 commit comments

Comments
 (0)