xenium
Loading...
Searching...
No Matches
xenium::reclamation::generic_epoch_based< Traits > Class Template Reference

A generalized implementation of epoch based reclamation. More...

#include <generic_epoch_based.hpp>

Public Types

template<class... Policies>
using with = generic_epoch_based<typename Traits::template with<Policies...>>
 Customize the reclamation scheme with the given policies.
 

Detailed Description

template<class Traits = generic_epoch_based_traits<>>
class xenium::reclamation::generic_epoch_based< Traits >

A generalized implementation of epoch based reclamation.

For general information about the interface of the reclamation scheme see Reclamation scheme interface.

This implementation is parameterized and can be configured in many ways. For example:

This class does not take a list of policies, but a Traits type that can be customized with a list of policies. Use the with<> template alias to pass your custom policies (see the previous examples for epoch_based, new_epoch_based and debra).

The following policies are supported:

  • xenium::policy::scan_frequency
    Defines how often a thread should scan the epochs of the other threads in an attempt to update the global epoch. (defaults to 100)
  • xenium::policy::scan
    Defines how many threads should be scanned. Possible values are all_threads, one_thread and n_threads. (defaults to all_threads)
  • xenium::policy::abandon
    Defines when local retired nodes should be abandoned, so they can be reclaimed by some other thread. Possible values are never, always and when_exceeds_threshold. (defaults to never)
  • xenium::policy::region_extension
    Defines the effect a region_guard should have. (defaults to region_extension::eager)
Template Parameters
Traits

Member Typedef Documentation

◆ with

template<class Traits = generic_epoch_based_traits<>>
template<class... Policies>
using xenium::reclamation::generic_epoch_based< Traits >::with = generic_epoch_based<typename Traits::template with<Policies...>>

Customize the reclamation scheme with the given policies.

The given policies are applied to the current configuration, replacing previously specified policies of the same type.

The resulting type is the newly configured reclamation scheme.

Template Parameters
Policieslist of policies to customize the behaviour