6 Commits

Author SHA1 Message Date
Seth Hillbrand 1b4a840820 Attempt to fix ordering issue when quitting
In some cases (mostly mac but not just), we can get to the dtor for
thread pool after the CV has already been destroyed.  This prevents that
from being possible and hopefully fixes the crash

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22583
2025-12-27 15:24:35 -08:00
Seth Hillbrand 452e69de85 Move thread pool into true singleton
Thread pool needs to be stored in a single location for all of KiCad
otherwise each kiface will spin up its own pool of persistent threads
2025-01-09 09:03:08 -08:00
Marek Roszko 4d77fd48ef Shove thread_pool to core 2023-09-06 17:50:12 -04:00
Jeff Young 0ae2a8483e Debugging aid. 2022-10-20 18:37:48 +01:00
jean-pierre charras d90a2cc6b5 tread_pool: create it on the heap, because creating it static generate a DTOR issue on mingw.
When built with mingw, the tread_pool DTOR is probably called too late, and treads are
not cleaned correctly, and the application hangs on exit.
2022-07-08 19:07:21 +02:00
Seth Hillbrand 03c279ffd4 ADDED: Threadpool
Thread pools are long-lasting executors that have close to zero overhead
when launching new jobs.  This is advantageous over creating new threads
as we can use this for threading smalling jobs and smaller quanta.  It
also avoids the heuristics needed to determine the optimal number of
threads to spawn
2022-06-24 22:59:24 +00:00