![]() |
Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Public Member Functions | |
cUpdateThread (cMojangAPI &a_MojangAPI) | |
virtual | ~cUpdateThread () override |
![]() | |
cIsThread (const AString &a_ThreadName) | |
bool | IsCurrentThread (void) const |
Returns true if the thread calling this function is the thread contained within this object. More... | |
bool | Start (void) |
Starts the thread; returns without waiting for the actual start. More... | |
void | Stop (void) |
Signals the thread to terminate and waits until it's finished. More... | |
bool | Wait (void) |
Waits for the thread to finish. More... | |
virtual | ~cIsThread () |
Protected Member Functions | |
virtual void | Execute (void) override |
This is the main thread entrypoint. More... | |
Protected Attributes | |
cEvent | m_evtNotify |
The event used for notifying that the thread should terminate, as well as timing. More... | |
cMojangAPI & | m_MojangAPI |
The cMojangAPI instance to update. More... | |
![]() | |
std::atomic< bool > | m_ShouldTerminate |
The overriden Execute() method should check this value periodically and terminate if this is true. More... | |
Private Types | |
typedef cIsThread | super |
Definition at line 231 of file MojangAPI.cpp.
|
private |
Definition at line 234 of file MojangAPI.cpp.
|
inline |
Definition at line 236 of file MojangAPI.cpp.
|
inlineoverridevirtual |
Definition at line 242 of file MojangAPI.cpp.
|
inlineoverrideprotectedvirtual |
This is the main thread entrypoint.
This function, overloaded by the descendants, is called in the new thread.
Implements cIsThread.
Definition at line 262 of file MojangAPI.cpp.
|
protected |
The event used for notifying that the thread should terminate, as well as timing.
Definition at line 258 of file MojangAPI.cpp.
|
protected |
The cMojangAPI instance to update.
Definition at line 255 of file MojangAPI.cpp.