HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_TaskGroupContext Class Reference

#include <UT_TaskGroup.h>

+ Inheritance diagram for UT_TaskGroupContext:

Public Types

enum  KindType { ISOLATED = me::isolated, BOUND = me::bound }
 

Public Member Functions

 UT_TaskGroupContext (KindType relation_to_parent=BOUND)
 
 ~UT_TaskGroupContext ()=default
 
void reset ()
 
bool cancelGroupExecution ()
 
bool isGroupExecutionCancelled () const
 

Static Public Member Functions

static void cancelCurrentGroupExecution ()
 Cancel the entire current task group context when run within a task. More...
 

Detailed Description

Definition at line 26 of file UT_TaskGroup.h.

Member Enumeration Documentation

Enumerator
ISOLATED 
BOUND 

Definition at line 32 of file UT_TaskGroup.h.

Constructor & Destructor Documentation

UT_TaskGroupContext::UT_TaskGroupContext ( KindType  relation_to_parent = BOUND)
inline

Constructs an empty task_group_context.

If relation_to_parent is bound, the task_group_context will become a child of the innermost running task's group when it is first spawned. If this call is made directly from the user thread, the effect will be as if relation_to_parent were isolated. If relation_to_parent is isolated, it has no parent task_group_context.

Definition at line 45 of file UT_TaskGroup.h.

UT_TaskGroupContext::~UT_TaskGroupContext ( )
default

Destroys an empty task_group_context. The behavior is undefined if there are still extant tasks associated with this task_group_context.

Member Function Documentation

static void UT_TaskGroupContext::cancelCurrentGroupExecution ( )
inlinestatic

Cancel the entire current task group context when run within a task.

Definition at line 81 of file UT_TaskGroup.h.

bool UT_TaskGroupContext::cancelGroupExecution ( )
inline

Requests that tasks in group be cancelled.

Returns
False if group is already cancelled; true otherwise. If concurrently called by multiple threads, exactly one call returns true and the rest return false.

Definition at line 69 of file UT_TaskGroup.h.

bool UT_TaskGroupContext::isGroupExecutionCancelled ( ) const
inline
Returns
True if group has received cancellation.

Definition at line 75 of file UT_TaskGroup.h.

void UT_TaskGroupContext::reset ( void  )
inline

Reinitializes this to uncancelled state.

Warning
This method is only safe to call once all tasks associated with the group's subordinate groups have completed. This method must not be invoked concurrently by multiple threads.

Definition at line 59 of file UT_TaskGroup.h.


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