KiCad PCB EDA Suite
thread_pool.cpp File Reference
#include <thread_pool.h>

Go to the source code of this file.

Functions

thread_poolGetKiCadThreadPool ()
 Get a reference to the current thread pool. More...
 

Variables

static thread_pooltp = nullptr
 

Function Documentation

◆ GetKiCadThreadPool()

thread_pool & GetKiCadThreadPool ( )

Get a reference to the current thread pool.

N.B., you cannot copy the thread pool so if you accidentally write thread_pool tp = GetKiCadThreadPool(), you will break your compilation

Returns
Reference to the current (potentially newly constructed) thread pool

Definition at line 32 of file thread_pool.cpp.

33{
34#if 0 // Turn this on to disable multi-threading for debugging
35 if( !tp ) tp = new thread_pool( 1 );
36#else
37 if( !tp ) tp = new thread_pool;
38#endif
39
40 return *tp;
41}
static thread_pool * tp
Definition: thread_pool.cpp:30
BS::thread_pool thread_pool
Definition: thread_pool.h:30

References tp.

Referenced by CN_CONNECTIVITY_ALGO::Build(), CONNECTION_GRAPH::buildConnectionGraph(), BOARD::CacheTriangulation(), CONNECTIVITY_DATA::ComputeLocalRatsnest(), ZONE_FILLER::Fill(), FOOTPRINT_LIST_IMPL::loadFootprints(), FOOTPRINT_LIST_IMPL::loadLibs(), CONNECTION_GRAPH::resolveAllDrivers(), DRC_CACHE_GENERATOR::Run(), DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run(), DRC_TEST_PROVIDER_DISALLOW::Run(), DRC_TEST_PROVIDER_SLIVER_CHECKER::Run(), DRC_TEST_PROVIDER_ZONE_CONNECTIONS::Run(), CN_CONNECTIVITY_ALGO::searchConnections(), CONNECTION_GRAPH::updateItemConnectivity(), and CONNECTIVITY_DATA::updateRatsnest().

Variable Documentation

◆ tp