Resource Loader Thread. More...
#include <deResourceLoaderThread.h>
Public Member Functions | |
Constructors and Destructors | |
| deResourceLoaderThread (deEngine *engine) | |
| Creates a new thread. | |
| virtual | ~deResourceLoaderThread () |
| Cleans up the thread. | |
Management | |
| bool | IsWaiting () |
| Determines if the thread is waiting. | |
| void | SetExitThread (bool exitThread) |
| Sets the exit thread flag. | |
| deResourceLoaderTask * | GetTask () const |
| Retrieves the assigned task. | |
| void | SetTask (deResourceLoaderTask *task) |
| Sets the assigned task. | |
| void | LockTask () |
| Locks the task. | |
| void | UnlockTask () |
| Unlocks the task. | |
| void | Resume () |
| Resume thread. | |
| void | SafeStop () |
| Safely stops the thread. | |
| virtual void | Run () |
| Loads the resource. | |
Resource Loader Thread.
Thread responsible for loading a resource. Stores the task this thread has been assigned to. Uses a mutex to synchronize state changes in the assigned task as well as a semaphore to wake the thread from sleep to resume work or to shut down.
| deResourceLoaderThread::deResourceLoaderThread | ( | deEngine * | engine ) |
Creates a new thread.
| virtual deResourceLoaderThread::~deResourceLoaderThread | ( | ) | [virtual] |
Cleans up the thread.
| deResourceLoaderTask* deResourceLoaderThread::GetTask | ( | ) | const [inline] |
Retrieves the assigned task.
| bool deResourceLoaderThread::IsWaiting | ( | ) |
Determines if the thread is waiting.
| void deResourceLoaderThread::LockTask | ( | ) |
Locks the task.
| void deResourceLoaderThread::Resume | ( | ) |
Resume thread.
| virtual void deResourceLoaderThread::Run | ( | ) | [virtual] |
Loads the resource.
Implements deThread.
| void deResourceLoaderThread::SafeStop | ( | ) |
Safely stops the thread.
| void deResourceLoaderThread::SetExitThread | ( | bool | exitThread ) |
Sets the exit thread flag.
| void deResourceLoaderThread::SetTask | ( | deResourceLoaderTask * | task ) |
Sets the assigned task.
| void deResourceLoaderThread::UnlockTask | ( | ) |
Unlocks the task.
1.7.2