KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KICAD_SINGLETON Class Reference

#include <singleton.h>

Public Member Functions

 KICAD_SINGLETON ()
 
 ~KICAD_SINGLETON ()
 
void Shutdown ()
 Explicitly shut down and destroy the thread pool and GL context manager.
 
void Init ()
 

Public Attributes

BS::priority_thread_poolm_ThreadPool
 
GL_CONTEXT_MANAGERm_GLContextManager
 

Detailed Description

Definition at line 35 of file singleton.h.

Constructor & Destructor Documentation

◆ KICAD_SINGLETON()

KICAD_SINGLETON::KICAD_SINGLETON ( )
inline

Definition at line 38 of file singleton.h.

References m_GLContextManager, and m_ThreadPool.

◆ ~KICAD_SINGLETON()

KICAD_SINGLETON::~KICAD_SINGLETON ( )

Definition at line 26 of file singleton.cpp.

References Shutdown().

Member Function Documentation

◆ Init()

void KICAD_SINGLETON::Init ( )

Definition at line 57 of file singleton.cpp.

References ADVANCED_CFG::GetCfg(), m_GLContextManager, and m_ThreadPool.

◆ Shutdown()

void KICAD_SINGLETON::Shutdown ( )

Explicitly shut down and destroy the thread pool and GL context manager.

This must be called before static destruction begins to avoid crashes on macOS where the thread pool destructor tries to wait on condition variables during static destruction, after other statics have already been destroyed.

After calling Shutdown(), the destructor becomes a no-op.

Definition at line 35 of file singleton.cpp.

References InvalidateKiCadThreadPool(), m_GLContextManager, and m_ThreadPool.

Referenced by ~KICAD_SINGLETON().

Member Data Documentation

◆ m_GLContextManager

GL_CONTEXT_MANAGER* KICAD_SINGLETON::m_GLContextManager

Definition at line 60 of file singleton.h.

Referenced by Init(), KICAD_SINGLETON(), and Shutdown().

◆ m_ThreadPool

BS::priority_thread_pool* KICAD_SINGLETON::m_ThreadPool

Definition at line 59 of file singleton.h.

Referenced by Init(), KICAD_SINGLETON(), and Shutdown().


The documentation for this class was generated from the following files: