Drag[en]gine Game Engine  1.0
deParallelProcessing Class Reference

Parallel task processing. More...

#include <deParallelProcessing.h>

Public Member Functions

Constructors and Destructors
 deParallelProcessing (deEngine &engine)
 Create parallel task processor. More...
 
 ~deParallelProcessing ()
 Clean up parallel task processor. More...
 
Management
bool GetOutputDebugMessages () const
 Debug messages are output to the engine logger. More...
 
void Update ()
 Update task processing. More...
 
void WaitForAllTasks ()
 Wait for all tasks to be processed. More...
 
void WaitForTask (deParallelTask *task)
 Wait for a task to finsihed. More...
 
void AddTask (deParallelTask *task)
 Add task to run the next time possible. More...
 
deParallelThread Only
deParallelTaskNextPendingTask ()
 Next pending task or NULL if there is none. More...
 
void WaitOnNewTasksSemaphore ()
 Wait on the new tasks semaphore. More...
 
void AddFinishedTask (deParallelTask *task)
 Add task to the list of finished tasks. More...
 
void AddDebugMessage (const char *message)
 Add debug message (thread-safe). More...
 
void LogDebugMessages ()
 Output debug messages to the logger. Thread safe call. More...
 

Detailed Description

Parallel task processing.

Author
Pl├╝ss Roland
Version
1.0
Date
2015

Constructor & Destructor Documentation

◆ deParallelProcessing()

deParallelProcessing::deParallelProcessing ( deEngine engine)

Create parallel task processor.

◆ ~deParallelProcessing()

deParallelProcessing::~deParallelProcessing ( )

Clean up parallel task processor.

Member Function Documentation

◆ AddDebugMessage()

void deParallelProcessing::AddDebugMessage ( const char *  message)

Add debug message (thread-safe).

Called by worker threads only (thread-safe).

Referenced by GetOutputDebugMessages().

◆ AddFinishedTask()

void deParallelProcessing::AddFinishedTask ( deParallelTask task)

Add task to the list of finished tasks.

Called by worker threads only (thread-safe). Caller looses the reference

Referenced by GetOutputDebugMessages().

◆ AddTask()

void deParallelProcessing::AddTask ( deParallelTask task)

Add task to run the next time possible.

Exceptions
deeInvalidParamtask is NULL.

Referenced by GetOutputDebugMessages().

◆ GetOutputDebugMessages()

bool deParallelProcessing::GetOutputDebugMessages ( ) const
inline

◆ LogDebugMessages()

void deParallelProcessing::LogDebugMessages ( )

Output debug messages to the logger. Thread safe call.

Called by worker threads only (thread-safe).

Referenced by GetOutputDebugMessages().

◆ NextPendingTask()

deParallelTask* deParallelProcessing::NextPendingTask ( )

Next pending task or NULL if there is none.

Called by worker threads only (thread-safe). Caller holds now the reference.

Referenced by GetOutputDebugMessages().

◆ Update()

void deParallelProcessing::Update ( )

Update task processing.

Call once a frame to update tasks. Assigns tasks to waiting threads and promotes finished tasks to the finished queue. Called by the game engine before the

  • scripting module does frame updates.

Referenced by GetOutputDebugMessages().

◆ WaitForAllTasks()

void deParallelProcessing::WaitForAllTasks ( )

Wait for all tasks to be processed.

Blocks until all tasks have been processed and removed. Call while entering entering debugging or freezing the engine to avoid problems.

Referenced by GetOutputDebugMessages().

◆ WaitForTask()

void deParallelProcessing::WaitForTask ( deParallelTask task)

Wait for a task to finsihed.

Blocks until the task is finished.

Exceptions
deeInvalidParamtask is NULL.

Referenced by GetOutputDebugMessages().

◆ WaitOnNewTasksSemaphore()

void deParallelProcessing::WaitOnNewTasksSemaphore ( )

Wait on the new tasks semaphore.

Called by worker threads only (thread-safe).

Referenced by GetOutputDebugMessages().


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