xenium
Loading...
Searching...
No Matches
xenium::policy::region_extension< Value > Struct Template Reference

Policy to configure the extension of critical regions in generic_epoch_based reclamation. More...

Detailed Description

template<reclamation::region_extension Value>
struct xenium::policy::region_extension< Value >

Policy to configure the extension of critical regions in generic_epoch_based reclamation.

This policy defines the effect of a region_guard instance. By default, a thread enters a critical region upon acquiring a guard_ptr to some node. This involves a sequential consistent fence which is relatively expensive, so it might make sense to extend the size of the region and only pay the price of the fence once. This can be achieved by using region_guards. The region_extension policy allows to define if/how a region_guard extends the size of a critical region. Possible values are:

  • xenium::reclamation::region_extension::none - no region extension is applied; construction and destruction of region_guard instances are no-ops.
  • xenium::reclamation::region_extension::eager - the size of the critical region is extended to the scope of the region_guard instance, i.e., the thread enters the critical region upon creation of the region_guard instance, and leaves the critical region when the region_guard gets destroyed.
  • xenium::reclamation::region_extension::lazy - the region is only entered whe a guard_ptr is acquired. However, once the the critical region has been entered it is only left once the region_guard is destroyed.
Template Parameters
Value