3#include <Foundation/Strings/String.h>
4#include <Foundation/Threading/AtomicInteger.h>
5#include <Foundation/Threading/Implementation/TaskSystemDeclarations.h>
6#include <Foundation/Types/RefCounted.h>
11 PL_DISALLOW_COPY_AND_ASSIGN(
plTask);
42 void SetMultiplicity(plUInt32 uiMultiplicity);
86 void Run(plUInt32 uiInvocation);
92 bool m_bCancelExecution =
false;
95 bool m_bTaskIsScheduled =
false;
98 bool m_bUsesMultiplicity =
false;
100 plUInt32 m_uiMultiplicity = 0;
103 plTaskNesting m_NestingMode = plTaskNesting::Maybe;
Base class for reference counted objects.
Definition RefCounted.h:52
Given out by plTaskSystem::CreateTaskGroup to identify a task group.
Definition TaskSystemDeclarations.h:103
Base class for custom tasks.
Definition Task.h:10
bool HasBeenCanceled() const
Can be used inside an overridden 'Execute' function to terminate execution prematurely.
Definition Task.h:58
virtual void ExecuteWithMultiplicity(plUInt32 uiInvocation) const
Override this to implement the task's supposed functionality.
Definition Task.h:76
virtual void Execute()
Override this to implement the task's supposed functionality.
Definition Task.h:65
bool IsTaskFinished() const
Returns whether the task has been finished. This includes being canceled.
Definition Task.h:55
plUInt32 GetMultiplicity() const
Definition Task.h:45
This system allows to automatically distribute tasks onto a number of worker threads.
Definition TaskSystem.h:25