proxygen
|
#include <GlobalThreadPoolList.h>
Public Member Functions | |
ThreadPoolListHook (std::string name) | |
~ThreadPoolListHook () | |
void | registerThread () |
ThreadPoolListHook (const ThreadPoolListHook &other)=delete | |
ThreadPoolListHook & | operator= (const ThreadPoolListHook &)=delete |
Private Member Functions | |
ThreadPoolListHook () | |
A hook for tracking which threads belong to which thread pools. This is used only by a gdb extension to aid in debugging. You won't be able to see any useful information from within C++ code.
An instance of ThreadPoolListHook should be created in the thread pool class that you want to keep track of. Then, to register a thread you call registerThread() on your instance of ThreadPoolListHook from that thread.
When a thread exits it will be removed from the list When the thread pool is destroyed, it will be removed from the list
Definition at line 41 of file GlobalThreadPoolList.h.
|
explicit |
Name is used to identify the thread pool when listing threads.
Definition at line 205 of file GlobalThreadPoolList.cpp.
folly::ThreadPoolListHook::~ThreadPoolListHook | ( | ) |
Definition at line 209 of file GlobalThreadPoolList.cpp.
|
delete |
|
private |
|
delete |
void folly::ThreadPoolListHook::registerThread | ( | ) |
Call this from any new thread that the thread pool creates.
Definition at line 213 of file GlobalThreadPoolList.cpp.
Referenced by folly::IOThreadPoolExecutor::threadRun(), and folly::CPUThreadPoolExecutor::threadRun().