A ThreadFactory that names each thread it creates.
Synopsis
Declared in <folly/executors/thread_factory/NamedThreadFactory.h>
class NamedThreadFactory
: public ThreadFactory
Description
Threads are named by joining a shared prefix with a monotonically increasing suffix, so each thread gets a distinct, recognizable name.
Base Classes
Name |
Description |
Interface for creating threads used by executors. |
Member Functions
Name |
Description |
|
Construct a factory that names threads using the given prefix. |
|
Return the current thread name prefix. |
|
Create a new thread that runs the given function under a generated name. |
Change the prefix used to name threads created after this call. |
Protected Data Members
Name |
Description |
The name prefix shared by every thread this factory creates. |
|
The next numeric suffix appended to a thread name. |
Created with MrDocs