QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
Loading...
Searching...
No Matches
quickcpplib::_xxx::configurable_spinlock::spins_to_yield< spins >::policy< parenttype > Struct Template Reference

#include "spinlock.hpp"

Inheritance diagram for quickcpplib::_xxx::configurable_spinlock::spins_to_yield< spins >::policy< parenttype >:
quickcpplib::_xxx::configurable_spinlock::spins_to_sleep::policy< spins_to_yield< 250 >::policy< spins_to_loop< 125 >::policy< shared_spinlockbase< uintptr_t > > > > quickcpplib::_xxx::configurable_spinlock::spins_to_sleep::policy< spins_to_yield< 250 >::policy< spins_to_loop< 125 >::policy< spinlockbase< T > > > >

Public Member Functions

constexpr policy ()
 policy (const policy &)=delete
constexpr policy (policy &&o) noexcept
constexpr bool int_yield (size_t n) noexcept

Static Public Attributes

static constexpr size_t spins_to_yield = spins

Constructor & Destructor Documentation

◆ policy() [1/3]

template<size_t spins>
template<class parenttype>
quickcpplib::_xxx::configurable_spinlock::spins_to_yield< spins >::policy< parenttype >::policy ( )
inlineconstexpr
616{}

◆ policy() [2/3]

template<size_t spins>
template<class parenttype>
quickcpplib::_xxx::configurable_spinlock::spins_to_yield< spins >::policy< parenttype >::policy ( const policy< parenttype > & )
delete

◆ policy() [3/3]

template<size_t spins>
template<class parenttype>
quickcpplib::_xxx::configurable_spinlock::spins_to_yield< spins >::policy< parenttype >::policy ( policy< parenttype > && o)
inlineconstexprnoexcept
620 {
621 }
How many spins to yield the current thread's timeslice.
Definition spinlock.hpp:612

Member Function Documentation

◆ int_yield()

template<size_t spins>
template<class parenttype>
bool quickcpplib::_xxx::configurable_spinlock::spins_to_yield< spins >::policy< parenttype >::int_yield ( size_t n)
inlineconstexprnoexcept
623 {
625 return true;
626 if(n >= spins)
627 return false;
629 return true;
630 }

Member Data Documentation

◆ spins_to_yield

template<size_t spins>
template<class parenttype>
size_t quickcpplib::_xxx::configurable_spinlock::spins_to_yield< spins >::policy< parenttype >::spins_to_yield = spins
staticconstexpr

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