kicad/libs
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
..
core Use 64-bit type to represent microseconds. 2024-03-03 21:40:26 +03:00
kimath Fix triangulationValid check race for zone fill 2024-03-14 22:26:23 +00:00
kiplatform Disable infinite panning when using XWayland. 2024-03-12 10:31:23 +03:00
sexpr Unwrap the FROM_UTF8 macro in favor of direct function 2023-09-09 00:10:57 -04:00
CMakeLists.txt Introduce core interface library 2023-04-06 15:01:18 +01:00