|
Urho3D
|
Operating system thread. More...
#include </home/runner/work/urho3d-doxygen.github.io/urho3d-doxygen.github.io/urho3d_repo/Source/Urho3D/Core/Thread.h>
Public Member Functions | |
| Thread () | |
| Construct. Does not start the thread yet. | |
| virtual | ~Thread () |
| Destruct. If running, stop and wait for thread to finish. | |
| virtual void | ThreadFunction ()=0 |
| The function to run in the thread. More... | |
| bool | Run () |
| Start running the thread. Return true if successful, or false if already running or if can not create the thread. | |
| void | Stop () |
| Set the running flag to false and wait for the thread to finish. | |
| void | SetPriority (int priority) |
| Set thread priority. The thread must have been started first. | |
| bool | IsStarted () const |
| Return whether thread exists. | |
Protected Attributes | |
| void * | handle_ |
| Thread handle. | |
| volatile bool | shouldRun_ |
| Running flag. | |
Static Protected Attributes | |
| static ThreadID | mainThreadID |
| Main thread's thread ID. | |
Operating system thread.
|
pure virtual |
The function to run in the thread.
Implemented in Urho3D::FileWatcher, Urho3D::HttpRequest, and Urho3D::BackgroundLoader.