cds  1.4.0
Data Structures | Typedefs
cds::backoff Namespace Reference

Different backoff schemes. More...

Data Structures

struct  empty
 Empty backoff strategy. Do nothing. More...
 
struct  yield
 Switch to another thread (yield). Good for thread preemption architecture. More...
 
struct  pause
 Random pause. More...
 
struct  hint
 Processor hint back-off. More...
 
class  exponential
 Exponential back-off. More...
 

Typedefs

typedef exponential< hint, yieldDefault
 Default backoff strategy.
 
typedef exponential< hint, yieldLockDefault
 Default back-off strategy for lock primitives.
 

Detailed Description

Different backoff schemes.

Back-off schema may be used in lock-free algorithms when the algorithm cannot perform some action because a conflict with the other concurrent operation is encountered. In this case current thread can do another work or can call processor's performance hint.

The interface of back-off strategy is following:

struct backoff_strategy {
void operator()() ;
void reset() ;
};

operator() operator calls back-off strategy's action. It is main part of back-off strategy.

reset() function resets internal state of back-off strategy to initial state. It is required for some back-off strategies, for example, exponential back-off.


cds 1.4.0 Developed by Maxim Khiszinsky aka khizmax 2007 - 2012
Autogenerated Mon May 20 2013 00:37:55 by Doxygen 1.8.3.1