cds  2.3.2
cds::intrusive::treiber_stack::traits Struct Reference

TreiberStack default type traits. More...

#include <cds/intrusive/treiber_stack.h>

Public Types

typedef cds::backoff::Default back_off
 Back-off strategy.
 
typedef treiber_stack::base_hook hook
 Hook, possible types are treiber_stack::base_hook, treiber_stack::member_hook, treiber_stack::traits_hook.
 
typedef opt::v::empty_disposer disposer
 The functor used for dispose removed items. Default is opt::v::empty_disposer. This option is used only in TreiberStack::clear() function.
 
typedef cds::atomicity::empty_item_counter item_counter
 Item counting feature; by default, disabled. Use cds::atomicity::item_counter to enable item counting.
 
typedef opt::v::relaxed_ordering memory_model
 C++ memory ordering model. More...
 
typedef treiber_stack::empty_stat stat
 Internal statistics (by default, disabled) More...
 

Static Public Attributes

static constexpr const opt::link_check_type link_checker = opt::debug_check_link
 Link checking, see cds::opt::link_checker.
 

Elimination back-off traits

The following traits is used only if elimination enabled

typedef cds::backoff::delay elimination_backoff
 Back-off strategy to wait for elimination, default is cds::backoff::delay<>
 
typedef opt::v::initialized_static_buffer< int, 4 > buffer
 Buffer type for elimination array. More...
 
typedef opt::v::c_rand random_engine
 Random engine to generate a random position in elimination array.
 
typedef cds::sync::spin lock_type
 Lock type used in elimination, default is cds::sync::spin.
 
static constexpr const bool enable_elimination = false
 Enable elimination back-off; by default, it is disabled.
 

Detailed Description

TreiberStack default type traits.

Member Typedef Documentation

◆ buffer

Buffer type for elimination array.

Possible types are opt::v::initialized_static_buffer, opt::v::initialized_dynamic_buffer. The buffer can be any size: Exp2 template parameter of those classes can be false. The size should be selected empirically for your application and hardware, there are no common rules for that. Default is opt::v::initialized_static_buffer< any_type, 4 > .

◆ memory_model

C++ memory ordering model.

Can be opt::v::relaxed_ordering (relaxed memory model, the default) or opt::v::sequential_consistent (sequentially consisnent memory model).

◆ stat

Internal statistics (by default, disabled)

Possible option value are: treiber_stack::stat, treiber_stack::empty_stat (the default), user-provided class that supports treiber_stack::stat interface.


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

cds 2.3.2 Developed by Maxim Khizhinsky aka khizmax and other contributors 2007 - 2017
Autogenerated Sun Dec 31 2017 12:10:49 by Doxygen 1.8.13