Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Skyfire::Thread Class Reference

#include <Threading.h>

Collaboration diagram for Skyfire::Thread:

Public Member Functions

void destroy ()
void resume ()
void setPriority (Priority type)
bool start ()
void suspend ()
 Thread ()
 Thread (Runnable *instance)
bool wait ()
 ~Thread ()

Static Public Member Functions

static Threadcurrent ()
static std::thread::native_handle_type currentHandle ()
static uint64_t currentId ()
static void Sleep (unsigned long msecs)

Private Member Functions

Threadoperator= (const Thread &)
 Thread (const Thread &)

Static Private Member Functions

static void ThreadTask (Runnable *param)

Private Attributes

uint64_t m_iThreadId
bool m_started
Runnablem_task
std::thread m_thread

Detailed Description

Definition at line 57 of file Threading.h.

Constructor & Destructor Documentation

◆ Thread() [1/3]

Thread::Thread ( )

Definition at line 30 of file Threading.cpp.

References m_iThreadId, m_started, and m_task.

Referenced by current(), operator=(), and Thread().

◆ Thread() [2/3]

Thread::Thread ( Runnable * instance)
explicit

Definition at line 32 of file Threading.cpp.

References ASSERT, m_iThreadId, m_started, m_task, and start().

◆ ~Thread()

Thread::~Thread ( )

Definition at line 42 of file Threading.cpp.

References m_task, and m_thread.

◆ Thread() [3/3]

Skyfire::Thread::Thread ( const Thread & )
private

References Thread().

Member Function Documentation

◆ current()

Thread * Thread::current ( )
static

Definition at line 124 of file Threading.cpp.

References currentId(), m_iThreadId, m_started, and Thread().

◆ currentHandle()

std::thread::native_handle_type Thread::currentHandle ( )
static

Definition at line 119 of file Threading.cpp.

◆ currentId()

uint64_t Thread::currentId ( )
static

Definition at line 114 of file Threading.cpp.

Referenced by current(), MySQL::Thread_End(), and MySQL::Thread_Init().

◆ destroy()

void Thread::destroy ( )

Definition at line 88 of file Threading.cpp.

References m_iThreadId, m_started, and m_thread.

◆ operator=()

Thread & Skyfire::Thread::operator= ( const Thread & )
private

References Thread().

◆ resume()

void Thread::resume ( )

Definition at line 101 of file Threading.cpp.

◆ setPriority()

void Thread::setPriority ( Priority type)

Definition at line 136 of file Threading.cpp.

◆ Sleep()

void Thread::Sleep ( unsigned long msecs)
static

Definition at line 141 of file Threading.cpp.

References Skyfire::SleepForMilliseconds().

◆ start()

bool Thread::start ( )

Definition at line 52 of file Threading.cpp.

References m_iThreadId, m_started, m_task, m_thread, and ThreadTask().

Referenced by Thread().

◆ suspend()

void Thread::suspend ( )

Definition at line 97 of file Threading.cpp.

◆ ThreadTask()

void Thread::ThreadTask ( Runnable * param)
staticprivate

Definition at line 105 of file Threading.cpp.

References Skyfire::Runnable::decReference(), and Skyfire::Runnable::run().

Referenced by start().

◆ wait()

bool Thread::wait ( )

Definition at line 75 of file Threading.cpp.

References m_iThreadId, m_started, and m_thread.

Member Data Documentation

◆ m_iThreadId

uint64_t Skyfire::Thread::m_iThreadId
private

Definition at line 84 of file Threading.h.

Referenced by current(), destroy(), start(), Thread(), Thread(), and wait().

◆ m_started

bool Skyfire::Thread::m_started
private

Definition at line 87 of file Threading.h.

Referenced by current(), destroy(), start(), Thread(), Thread(), and wait().

◆ m_task

Runnable* Skyfire::Thread::m_task
private

Definition at line 86 of file Threading.h.

Referenced by start(), Thread(), Thread(), and ~Thread().

◆ m_thread

std::thread Skyfire::Thread::m_thread
private

Definition at line 85 of file Threading.h.

Referenced by destroy(), start(), wait(), and ~Thread().


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