MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
Mezzanine::Threading::this_thread Namespace Reference

A partial implementation of std::thread::this_thread. More...

Functions

ThreadId MEZZ_LIB get_id ()
 Return the thread ID of the calling thread. More...
 
void MEZZ_LIB sleep_for (UInt32 MicroSeconds)
 Blocks the calling thread for a period of time. More...
 
void MEZZ_LIB yield ()
 Yield execution to another thread. More...
 

Detailed Description

A partial implementation of std::thread::this_thread.

Function Documentation

ThreadId Mezzanine::Threading::this_thread::get_id ( )

Return the thread ID of the calling thread.

Returns
A thread::id unique to this thread.

Definition at line 296 of file thread.cpp.

void Mezzanine::Threading::this_thread::sleep_for ( UInt32  MicroSeconds)

Blocks the calling thread for a period of time.

Parameters
MicroSecondsMinimum time to put the thread to sleep.

Definition at line 314 of file thread.cpp.

void MEZZ_LIB Mezzanine::Threading::this_thread::yield ( )

Yield execution to another thread.

Offers the operating system the opportunity to schedule another thread that is ready to run on the current processor.

Definition at line 305 of file thread.cpp.