Bitcoin Core 30.99.0
P2P Digital Currency
Classes | Functions | Variables
threadpool.cpp File Reference
#include <logging.h>
#include <util/threadpool.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <atomic>
#include <future>
#include <queue>
Include dependency graph for threadpool.cpp:

Go to the source code of this file.

Classes

struct  ExpectedException
 
struct  ThrowTask
 
struct  CounterTask
 

Functions

static void GetFuture (std::future< void > &future, uint32_t &fail_counter)
 
static void StartPoolIfNeeded () EXCLUSIVE_LOCKS_REQUIRED(!g_pool_mutex)
 
static void setup_threadpool_test ()
 
 FUZZ_TARGET (threadpool,.init=setup_threadpool_test) EXCLUSIVE_LOCKS_REQUIRED(!g_pool_mutex)
 

Variables

ThreadPool g_pool {"fuzz"}
 
Mutex g_pool_mutex
 
size_t g_num_workers = 3
 

Function Documentation

◆ FUZZ_TARGET()

FUZZ_TARGET ( threadpool  ,
init = setup_threadpool_test 
)

Definition at line 63 of file threadpool.cpp.

Here is the call graph for this function:

◆ GetFuture()

static void GetFuture ( std::future< void > &  future,
uint32_t &  fail_counter 
)
static

Definition at line 30 of file threadpool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_threadpool_test()

static void setup_threadpool_test ( )
static

Definition at line 57 of file threadpool.cpp.

Here is the call graph for this function:

◆ StartPoolIfNeeded()

static void StartPoolIfNeeded ( )
static

Definition at line 50 of file threadpool.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_num_workers

size_t g_num_workers = 3

Definition at line 48 of file threadpool.cpp.

◆ g_pool

ThreadPool g_pool {"fuzz"}

Definition at line 45 of file threadpool.cpp.

◆ g_pool_mutex

Mutex g_pool_mutex

Definition at line 46 of file threadpool.cpp.