Different backoff schemes. More...
|Empty backoff strategy. Do nothing. More...|
|Switch to another thread (yield). Good for thread preemption architecture. More...|
|Random pause. More...|
|Processor hint back-off. More...|
|Exponential back-off. More...|
|typedef exponential< hint, yield >||Default|
|Default backoff strategy. |
|typedef exponential< hint, yield >||LockDefault|
|Default back-off strategy for lock primitives. |
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:
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.