Arcane  4.2.2.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::SerialTask Class Reference
Inheritance diagram for Arcane::SerialTask:
Collaboration diagram for Arcane::SerialTask:

Public Types

typedef TaskFunctor< SerialTask > TaskType

Public Member Functions

 SerialTask (ITaskFunctor *f)
void launchAndWait () override
 Launches the task and blocks until it finishes.
void launchAndWait (ConstArrayView< ITask * > tasks) override
 Launches the child tasks tasks and blocks until they finish.
ITask_createChildTask (ITaskFunctor *functor) override
void launch () override
 Method allowing to launch the task.
void wait () override
 Method allowing to wait the end of the task.

Static Public Attributes

static const int FUNCTOR_CLASS_SIZE = sizeof(TaskType)

Private Attributes

ITaskFunctorm_functor
char functor_buf [FUNCTOR_CLASS_SIZE]

Detailed Description

Definition at line 33 of file ConcurrencyUtils.cc.

Member Typedef Documentation

◆ TaskType

typedef TaskFunctor<SerialTask> Arcane::SerialTask::TaskType

Definition at line 38 of file ConcurrencyUtils.cc.

Constructor & Destructor Documentation

◆ SerialTask()

Arcane::SerialTask::SerialTask ( ITaskFunctor * f)
inline

Definition at line 46 of file ConcurrencyUtils.cc.

Member Function Documentation

◆ _createChildTask()

ITask * Arcane::SerialTask::_createChildTask ( ITaskFunctor * functor)
inlineoverridevirtual

Implements Arcane::ITask.

Definition at line 74 of file ConcurrencyUtils.cc.

◆ launch()

void Arcane::SerialTask::launch ( )
inlineoverridevirtual

Method allowing to launch the task.

\warming You must call wait() to delete this object! No warning will be displayed if you forgot to do so.

Warning
Do not mix launchAndWait() methods and launch() / wait() methods.

Implements Arcane::ITask.

Definition at line 78 of file ConcurrencyUtils.cc.

References Arcane::ITaskFunctor::executeFunctor().

Here is the call graph for this function:

◆ launchAndWait() [1/2]

void Arcane::SerialTask::launchAndWait ( )
inlineoverridevirtual

Launches the task and blocks until it finishes.

After calling this function, the task is destroyed and must not be used again.

Warning
Do not mix launchAndWait() methods and launch() / wait() methods.

Implements Arcane::ITask.

Definition at line 59 of file ConcurrencyUtils.cc.

References Arcane::ITaskFunctor::executeFunctor().

Here is the call graph for this function:

◆ launchAndWait() [2/2]

void Arcane::SerialTask::launchAndWait ( ConstArrayView< ITask * > tasks)
inlineoverridevirtual

Launches the child tasks tasks and blocks until they finish.

Warning
Do not mix launchAndWait() methods and launch() / wait() methods.

Implements Arcane::ITask.

Definition at line 69 of file ConcurrencyUtils.cc.

References Arcane::ConstArrayView< T >::size().

Here is the call graph for this function:

◆ wait()

void Arcane::SerialTask::wait ( )
inlineoverridevirtual

Method allowing to wait the end of the task.

This method must be called after launch() method.

Warning
Do not mix launchAndWait() methods and launch() / wait() methods.

Implements Arcane::ITask.

Definition at line 87 of file ConcurrencyUtils.cc.

Member Data Documentation

◆ functor_buf

char Arcane::SerialTask::functor_buf[FUNCTOR_CLASS_SIZE]
private

Definition at line 95 of file ConcurrencyUtils.cc.

◆ FUNCTOR_CLASS_SIZE

const int Arcane::SerialTask::FUNCTOR_CLASS_SIZE = sizeof(TaskType)
static

Definition at line 42 of file ConcurrencyUtils.cc.

◆ m_functor

ITaskFunctor* Arcane::SerialTask::m_functor
private

Definition at line 94 of file ConcurrencyUtils.cc.


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