Bitcoin Core  22.99.0
P2P Digital Currency
Functions | Variables
util_threadnames_tests.cpp File Reference
#include <util/string.h>
#include <util/threadnames.h>
#include <mutex>
#include <set>
#include <string>
#include <thread>
#include <vector>
#include <boost/test/unit_test.hpp>
Include dependency graph for util_threadnames_tests.cpp:

Go to the source code of this file.

Functions

std::set< std::string > RenameEnMasse (int num_threads)
 Run a bunch of threads to all call util::ThreadRename. More...
 
 BOOST_AUTO_TEST_CASE (util_threadnames_test_rename_threaded)
 Rename a bunch of threads with the same basename (expect_multiple=true), ensuring suffixes are applied properly. More...
 

Variables

const std::string TEST_THREAD_NAME_BASE = "test_thread."
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( util_threadnames_test_rename_threaded  )

Rename a bunch of threads with the same basename (expect_multiple=true), ensuring suffixes are applied properly.

Definition at line 54 of file util_threadnames_tests.cpp.

Here is the call graph for this function:

◆ RenameEnMasse()

std::set<std::string> RenameEnMasse ( int  num_threads)

Run a bunch of threads to all call util::ThreadRename.

Returns
the set of name each thread has after attempted renaming.

Definition at line 29 of file util_threadnames_tests.cpp.

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

Variable Documentation

◆ TEST_THREAD_NAME_BASE

const std::string TEST_THREAD_NAME_BASE = "test_thread."

Definition at line 22 of file util_threadnames_tests.cpp.