LibreOffice LibreOffice 26.2 SDK C/C++ API Reference

Loading...
Searching...
No Matches
osl::Thread Class Referenceabstract

A thread abstraction. More...

`#include <thread.hxx>`

Inheritance diagram for osl::Thread:

## Public Member Functions
| Thread ()
virtual | ~Thread () COVERITY_NOEXCEPT_FALSE
bool | create ()
bool | createSuspended ()
virtual void | suspend ()
virtual void | resume ()
virtual void | terminate ()
virtual void | join ()
bool | isRunning () const
void | setPriority (oslThreadPriority Priority)
oslThreadPriority | getPriority () const
oslThreadIdentifier | getIdentifier () const
virtual bool | schedule ()
| operator oslThread () const

## Static Public Member Functions
static void * | operator new (size_t nSize)
static void | operator delete (void *pMem)
static void * | operator new (size_t, void *pMem)
static void | operator delete (void *, void *)
static oslThreadIdentifier | getCurrentIdentifier ()
static void | wait (const TimeValue &Delay)
static void | yield ()
static void | setName (char const *name) SAL_NOEXCEPT

## Protected Member Functions
virtual void | run ()=0
virtual void | onTerminated ()

## Friends
void | threadFunc (void *param)
| The thread functions calls the protected functions run and onTerminated.

## Detailed Description

A thread abstraction.

Deprecated
  use salhelper::Thread instead. Only the static member functions osl::Thread::getCurrentIdentifier, osl::Thread::wait, and osl::Thread::yield are not deprecated.

## Constructor & Destructor Documentation

## ◆ Thread()

osl::Thread::Thread | ( |  | ) |
| inline

## ◆ ~Thread()

virtual osl::Thread::~Thread | ( |  | ) |
| inline virtual

Reimplemented in salhelper::Thread.

## Member Function Documentation

## ◆ create()

bool osl::Thread::create | ( |  | ) |
| inline

## ◆ createSuspended()

bool osl::Thread::createSuspended | ( |  | ) |
| inline

## ◆ getCurrentIdentifier()

oslThreadIdentifier osl::Thread::getCurrentIdentifier | ( |  | ) |
| inline static

## ◆ getIdentifier()

oslThreadIdentifier osl::Thread::getIdentifier | ( |  | ) | const
| inline

## ◆ getPriority()

oslThreadPriority osl::Thread::getPriority | ( |  | ) | const
| inline

## ◆ isRunning()

bool osl::Thread::isRunning | ( |  | ) | const
| inline

## ◆ join()

virtual void osl::Thread::join | ( |  | ) |
| inline virtual

Reimplemented in salhelper::Thread.

## ◆ onTerminated()

virtual void osl::Thread::onTerminated | ( |  | ) |
| inline protected virtual

## ◆ operator delete() [1/2]

void osl::Thread::operator delete | ( | void * | ,
|  | void * | )
| inline static

## ◆ operator delete() [2/2]

void osl::Thread::operator delete | ( | void * | pMem | ) |
| inline static

## ◆ operator new() [1/2]

void * osl::Thread::operator new | ( | size_t | nSize | ) |
| inline static

## ◆ operator new() [2/2]

void * osl::Thread::operator new | ( | size_t | ,
|  | void * | pMem )
| inline static

## ◆ operator oslThread()

osl::Thread::operator oslThread | ( |  | ) | const
| inline

## ◆ resume()

virtual void osl::Thread::resume | ( |  | ) |
| inline virtual

## ◆ run()

virtual void osl::Thread::run | ( |  | ) |
| protected pure virtual

## ◆ schedule()

virtual bool osl::Thread::schedule | ( |  | ) |
| inline virtual

Reimplemented in salhelper::Thread.

## ◆ setName()

void osl::Thread::setName | ( | char const * | name | ) |
| inline static

## ◆ setPriority()

void osl::Thread::setPriority | ( | oslThreadPriority | Priority | ) |
| inline

## ◆ suspend()

virtual void osl::Thread::suspend | ( |  | ) |
| inline virtual

## ◆ terminate()

virtual void osl::Thread::terminate | ( |  | ) |
| inline virtual

Reimplemented in salhelper::Thread.

## ◆ wait()

void osl::Thread::wait | ( | const TimeValue & | Delay | ) |
| inline static

## ◆ yield()

void osl::Thread::yield | ( |  | ) |
| inline static

## Friends And Related Symbol Documentation

## ◆ threadFunc

void threadFunc | ( | void * | param | ) |
| friend

The thread functions calls the protected functions run and onTerminated.

The function's signature matches the one of oslWorkerFunction which is declared in osl/thread.h

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

- osl/thread.hxx