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

UT_TaskLock that avoids deadlocks when used with TBB task scheduling. More...

#include <UT_TaskLock.h>

+ Inheritance diagram for UT_TaskLockWithArena:

Public Member Functions

template<typename F >
void lockedExecute (const F &functor)
 
template<typename F >
void lockedExecute (const F &functor, UT_TaskArena &arena)
 
template<typename F >
void lockedExecuteWithoutArena (const F &functor)
 

Detailed Description

UT_TaskLock that avoids deadlocks when used with TBB task scheduling.

Definition at line 293 of file UT_TaskLock.h.

Member Function Documentation

template<typename F >
void UT_TaskLockWithArena::lockedExecute ( const F &  functor)
inline

Performs the functor F while inside this lock scope in UT_TaskArena. This method allows the optimization that if we're calling this while the lock is already held in the same task scope, then we can avoid creating an unnecessary task arena.

Definition at line 303 of file UT_TaskLock.h.

template<typename F >
void UT_TaskLockWithArena::lockedExecute ( const F &  functor,
UT_TaskArena arena 
)
inline

Performs the functor F while inside this lock scope in UT_TaskArena. This method uses an existing UT_TaskArena if the lock isn't help instead of creating a temporary one.

Definition at line 324 of file UT_TaskLock.h.

template<typename F >
void UT_TaskLockWithArena::lockedExecuteWithoutArena ( const F &  functor)
inline

Performs the functor F while inside this lock scope OUTSIDE an arena.

Note
Only do this if you know functor will never spawn tasks!

Definition at line 343 of file UT_TaskLock.h.


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