OpendTect  6.6
Public Member Functions | Protected Attributes | List of all members
Threads::Thread Class Reference

Is the base class for all threads. Start it by creating it and give it the function or CallBack to execute. More...

Public Member Functions

 Thread (const CallBack &, const char *nm=nullptr)
 
 Thread (void(*)(void *), const char *nm=nullptr)
 
virtual ~Thread ()
 
const char * getName () const
 
ThreadID threadID () const
 
void waitForFinish ()
 

Protected Attributes

QThread * thread_
 

Detailed Description

Is the base class for all threads. Start it by creating it and give it the function or CallBack to execute.

The process that has created the thread must call destroy() or detach().

<>

Constructor & Destructor Documentation

◆ Thread() [1/2]

Threads::Thread::Thread ( void(*)(void *)  ,
const char *  nm = nullptr 
)

◆ Thread() [2/2]

Threads::Thread::Thread ( const CallBack ,
const char *  nm = nullptr 
)

◆ ~Thread()

virtual Threads::Thread::~Thread ( )
virtual

Member Function Documentation

◆ getName()

const char* Threads::Thread::getName ( ) const

◆ threadID()

ThreadID Threads::Thread::threadID ( ) const

◆ waitForFinish()

void Threads::Thread::waitForFinish ( )

Stop the thread with this function. Will wait for the thread to return.

Member Data Documentation

◆ thread_

QThread* Threads::Thread::thread_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022