NVIDIA DeepStream SDK API Reference

9.2 Release
common::Thread Struct Referenceabstract

Detailed Description

A simple thread, derived class overloads onThread() method.

Definition at line 85 of file includes/opentelemetry/ext/http/server/socket_tools.h.

Inheritance diagram for common::Thread:

Public Member Functions

 Thread ()
 Thread Constructor More...
 
void startThread ()
 Start Thread More...
 
void joinThread ()
 Join Thread More...
 
bool shouldTerminate () const
 Indicates if this thread should terminate More...
 
virtual void onThread ()=0
 Must be implemented by children More...
 
virtual ~Thread () noexcept
 Thread destructor More...
 
 Thread ()
 Thread Constructor More...
 
void startThread ()
 Start Thread More...
 
void joinThread ()
 Join Thread More...
 
bool shouldTerminate () const
 Indicates if this thread should terminate More...
 
virtual void onThread ()=0
 Must be implemented by children More...
 
virtual ~Thread () noexcept
 Thread destructor More...
 

Data Fields

std::thread m_thread
 
std::atomic< bool > m_terminate {false}
 

Constructor & Destructor Documentation

◆ Thread() [1/2]

common::Thread::Thread ( )
inline

Thread Constructor

Returns
Thread

Definition at line 95 of file includes/opentelemetry/ext/http/server/socket_tools.h.

◆ ~Thread() [1/2]

virtual common::Thread::~Thread ( )
inlinevirtualnoexcept

Thread destructor

Returns

Definition at line 133 of file includes/opentelemetry/ext/http/server/socket_tools.h.

◆ Thread() [2/2]

common::Thread::Thread ( )
inline

Thread Constructor

Returns
Thread

Definition at line 95 of file 9.2/includes/opentelemetry/ext/http/server/socket_tools.h.

◆ ~Thread() [2/2]

virtual common::Thread::~Thread ( )
inlinevirtualnoexcept

Thread destructor

Returns

Definition at line 133 of file 9.2/includes/opentelemetry/ext/http/server/socket_tools.h.

Member Function Documentation

◆ joinThread() [1/2]

void common::Thread::joinThread ( )
inline

◆ joinThread() [2/2]

void common::Thread::joinThread ( )
inline

◆ onThread() [1/2]

virtual void common::Thread::onThread ( )
pure virtual

Must be implemented by children

Implemented in SocketTools::Reactor, and SocketTools::Reactor.

Referenced by startThread().

◆ onThread() [2/2]

virtual void common::Thread::onThread ( )
pure virtual

Must be implemented by children

Implemented in SocketTools::Reactor, and SocketTools::Reactor.

◆ shouldTerminate() [1/2]

bool common::Thread::shouldTerminate ( ) const
inline

Indicates if this thread should terminate

Returns

Definition at line 122 of file 9.2/includes/opentelemetry/ext/http/server/socket_tools.h.

References m_terminate.

◆ shouldTerminate() [2/2]

bool common::Thread::shouldTerminate ( ) const
inline

Indicates if this thread should terminate

Returns

Definition at line 122 of file includes/opentelemetry/ext/http/server/socket_tools.h.

References m_terminate.

Referenced by SocketTools::Reactor::onThread().

◆ startThread() [1/2]

void common::Thread::startThread ( )
inline

◆ startThread() [2/2]

void common::Thread::startThread ( )
inline

Field Documentation

◆ m_terminate

std::atomic< bool > common::Thread::m_terminate {false}

◆ m_thread

std::thread common::Thread::m_thread

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