RDK Documentation (Open Sourced RDK Components)
CCEC_OSAL::Thread Class Reference

#include <Thread.hpp>

Inheritance diagram for CCEC_OSAL::Thread:
Inheritance graph
Collaboration diagram for CCEC_OSAL::Thread:
Collaboration graph

Public Member Functions

 Thread (Runnable &target)
 Constructor. More...
 

- Name of the thread context.

Constructor

Allocates a new Thread object

Parameters
target- Object implementes Runnable interface.
Runnablerunnable
 Destructor. More...
 
std::string name
 Destructor. More...
 
void * nativeHandle
 Destructor. More...
 
 Thread (Runnable &target, const int8_t *name)
 Destructor. More...
 
virtual ~Thread (void)
 Destructor. More...
 
void run (void)
 Executes the run() method of runnable object. More...
 
void start (void)
 Starts excecution of the thread. More...
 
void stop (void)
 Stops execution of thread. More...
 
void detach (void)
 Detaches the thread. More...
 
void * getNativeHandle (void)
 Returns native thread handle. More...
 
static void * CEntry (void *arg)
 Destructor. More...
 

yes

A thread is a thread of execution in a program. An application could have multiple threads of execution running concurrently.

A class that needs thread functionality shall implement Runnable interface and object will be passed to Thread on creation of Thread object. On the invocation of start() method of Thread, runnable's run() will be executed in a threaded context.

Definition at line 64 of file Thread.hpp.

Member Function Documentation

◆ stop()

void CCEC_OSAL::Thread::stop ( void  )

Stops execution of thread.

Forces the thread to stop executing.

◆ getNativeHandle()

void* CCEC_OSAL::Thread::getNativeHandle ( void  )

Returns native thread handle.

Retrieves native thread handle if thread is started other wise returns null.

Returns
native thread handle.

Field Documentation

◆ runnable

Runnable& CCEC_OSAL::Thread::runnable
private

Destructor.

Destroys the Thread object

Definition at line 148 of file Thread.hpp.

◆ name

std::string CCEC_OSAL::Thread::name
private

Destructor.

Destroys the Thread object

Definition at line 149 of file Thread.hpp.

◆ nativeHandle

void* CCEC_OSAL::Thread::nativeHandle
private

Destructor.

Destroys the Thread object

Definition at line 150 of file Thread.hpp.


The documentation for this class was generated from the following files: