Skip to content

Commit

Permalink
Merge pull request #120 from Geode-solutions/perf/aabb-async
Browse files Browse the repository at this point in the history
fix(OpenGeode): add mutex in intersection detection
  • Loading branch information
MelchiorSchuh authored Dec 5, 2024
2 parents 79b121c + 9d0359f commit 9662762
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ namespace

void emplace( geode::index_t p1_id, geode::index_t p2_id )
{
std::lock_guard< std::mutex > lock( mutex_ );
intersecting_polygons_.emplace_back( p1_id, p2_id );
}

Expand Down Expand Up @@ -207,6 +208,7 @@ namespace
const geode::SurfaceMesh< Model::dim >& mesh2_;
std::vector< std::pair< geode::index_t, geode::index_t > >
intersecting_polygons_;
std::mutex mutex_;
};

template < typename Model >
Expand Down

0 comments on commit 9662762

Please sign in to comment.