Tervel  1.0.0
A collection of wait-free containers and algorithms.
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
tervel::util::RecursiveAction Class Reference

Helper class for RAII management of recursive helping of threads. More...

#include <recursive_action.h>

Public Member Functions

 RecursiveAction ()
 
 ~RecursiveAction ()
 

Static Public Member Functions

static bool recursive_return (bool change=false, bool value=false)
 
static void set_recursive_return ()
 
static void clear_recursive_return ()
 
static size_t recursive_depth (size_t i=0)
 Adds the passed value and returns the pre-incremented value. More...
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (RecursiveAction)
 

Detailed Description

Helper class for RAII management of recursive helping of threads.

Lifetime of this object handles the increment and decrement of the recursive_depth of the given ThreadInfo object and sets the recursive_return if needed.

Constructor & Destructor Documentation

tervel::util::RecursiveAction::RecursiveAction ( )
inline
tervel::util::RecursiveAction::~RecursiveAction ( )
inline

Member Function Documentation

static void tervel::util::RecursiveAction::clear_recursive_return ( )
inlinestatic
tervel::util::RecursiveAction::DISALLOW_COPY_AND_ASSIGN ( RecursiveAction  )
private
static size_t tervel::util::RecursiveAction::recursive_depth ( size_t  i = 0)
static

Adds the passed value and returns the pre-incremented value.

Parameters
ivalue to increment by
Returns
the value before the increment
static bool tervel::util::RecursiveAction::recursive_return ( bool  change = false,
bool  value = false 
)
static
Returns
whether or not the thread is performing a recursive return.
static void tervel::util::RecursiveAction::set_recursive_return ( )
inlinestatic

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