libzypp: zyppng::ThreadData Struct Reference

libzypp 17.38.6

zyppng::ThreadData Struct Reference

`#include <zypp-core/ng/base/private/threaddata_p.h>`

## Public Member Functions
template<typename T>
void | setName (T &&name)
const std::string & | name () const
std::shared_ptr< EventDispatcher > | dispatcher ()
std::shared_ptr< EventDispatcher > | ensureDispatcher (GMainContext *ctx=0)
void | setDispatcher (const std::shared_ptr< EventDispatcher > &disp)

## Static Public Member Functions
static ZYPP_API ThreadData & | current ()

## Private Member Functions
void | syncNativeName ()
| ThreadData ()

## Private Attributes
std::thread::id | _threadId
std::string | _threadName
| lazy initialized to _threadId if unset
std::thread::native_handle_type | _nativeHandle
std::weak_ptr< EventDispatcher > | _dispatcher

## Detailed Description

Definition at line 15 of file threaddata_p.h.

## Constructor & Destructor Documentation

## ◆ ThreadData()

zyppng::ThreadData::ThreadData | ( |  | ) |
| private

Definition at line 10 of file threaddata.cc.

## Member Function Documentation

## ◆ current()

ThreadData & zyppng::ThreadData::current | ( |  | ) |
| static

Definition at line 16 of file threaddata.cc.

## ◆ setName()

template<typename T>

void zyppng::ThreadData::setName | ( | T && | name | ) |
| inline

Definition at line 20 of file threaddata_p.h.

## ◆ name()

const std::string & zyppng::ThreadData::name | ( |  | ) | const

Definition at line 22 of file threaddata.cc.

## ◆ dispatcher()

std::shared_ptr< EventDispatcher > zyppng::ThreadData::dispatcher | ( |  | ) |

Definition at line 59 of file threaddata.cc.

## ◆ ensureDispatcher()

std::shared_ptr< EventDispatcher > zyppng::ThreadData::ensureDispatcher | ( | GMainContext * | ctx = 0 | ) |

Definition at line 32 of file threaddata.cc.

## ◆ setDispatcher()

void zyppng::ThreadData::setDispatcher | ( | const std::shared_ptr< EventDispatcher > & | disp | ) |

Definition at line 44 of file threaddata.cc.

## ◆ syncNativeName()

void zyppng::ThreadData::syncNativeName | ( |  | ) |
| private

Definition at line 53 of file threaddata.cc.

## Member Data Documentation

## ◆ _threadId

std::thread::id zyppng::ThreadData::_threadId
| private

Definition at line 37 of file threaddata_p.h.

## ◆ _threadName

std::string zyppng::ThreadData::_threadName
| mutableprivate

lazy initialized to _threadId if unset

Definition at line 38 of file threaddata_p.h.

## ◆ _nativeHandle

std::thread::native_handle_type zyppng::ThreadData::_nativeHandle
| private

Definition at line 39 of file threaddata_p.h.

## ◆ _dispatcher

std::weak_ptr<EventDispatcher> zyppng::ThreadData::_dispatcher
| private

Definition at line 40 of file threaddata_p.h.

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

- zypp-core/ng/base/private/threaddata_p.h
- zypp-core/ng/base/threaddata.cc