Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
kcenon::thread::thread_pool_crash_safety Class Reference

Thread pool crash safety extensions. More...

#include <crash_handler.h>

Collaboration diagram for kcenon::thread::thread_pool_crash_safety:
Collaboration graph

Static Public Member Functions

static void enable_for_pool (const std::string &pool_name, class thread_pool &pool)
 Enable crash safety for a thread pool.
 
static void set_job_crash_handler (std::function< void(const std::string &pool_name, const crash_context &)> handler)
 Register job crash handler.
 

Static Private Member Functions

static void handle_job_crash (const std::string &pool_name, const crash_context &context)
 

Detailed Description

Thread pool crash safety extensions.

Definition at line 222 of file crash_handler.h.

Member Function Documentation

◆ enable_for_pool()

static void kcenon::thread::thread_pool_crash_safety::enable_for_pool ( const std::string & pool_name,
class thread_pool & pool )
static

Enable crash safety for a thread pool.

Parameters
pool_nameUnique name for the thread pool
poolReference to the thread pool

Referenced by main().

Here is the caller graph for this function:

◆ handle_job_crash()

static void kcenon::thread::thread_pool_crash_safety::handle_job_crash ( const std::string & pool_name,
const crash_context & context )
staticprivate

◆ set_job_crash_handler()

static void kcenon::thread::thread_pool_crash_safety::set_job_crash_handler ( std::function< void(const std::string &pool_name, const crash_context &)> handler)
static

Register job crash handler.

Parameters
handlerFunction to call when a job crashes

Referenced by main().

Here is the caller graph for this function:

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