kicad/libs/kimath
StefanBruens e07b4ce8e4 Fix triangulationValid check race for zone fill
The m_triangulationValid flag is used in several places without holding
the mutex, thus it should only ever be set when the triangulation is
guaranteed to be valid.

This can either be done by protecting both data and flag by the same
mutex, or updating the flag only after the triangulation has finished.

Also fix the case when the triangulation actually fails, the flag should
not be set in this case.

While at it, simplify the recalculation check. Only if both the
triangulation is valid, and the data hash is unchanged the recalculation
can be skipped - this is typically the case when two threads try to
update the cache concurrently, the second one will block at the mutex,
and will see the valid data after the first thread has finished.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17180
2024-03-14 22:26:23 +00:00
..
include Fix triangulationValid check race for zone fill 2024-03-14 22:26:23 +00:00
src Fix triangulationValid check race for zone fill 2024-03-14 22:26:23 +00:00
CMakeLists.txt Transform is right at home in kimath 2023-09-07 18:03:33 -04:00
determine_if_point_inside_polygon.odt