cds  2.3.2
cds::algo::flat_combining::wait_strategy::empty Struct Reference

Empty wait strategy. More...

#include <cds/algo/flat_combining/wait_strategy.h>

Data Structures

struct  make_publication_record
 Metafunction for defining a publication record for flat combining technique. More...
 

Public Member Functions

template<typename PublicationRecord >
void prepare (PublicationRecord &rec)
 Prepares the strategy. More...
 
template<typename FCKernel , typename PublicationRecord >
bool wait (FCKernel &fc, PublicationRecord &rec)
 Waits for the combiner. More...
 
template<typename FCKernel , typename PublicationRecord >
void notify (FCKernel &fc, PublicationRecord &rec)
 Wakes up the thread. More...
 
template<typename FCKernel >
void wakeup (FCKernel &fc)
 Moves control to other thread. More...
 

Detailed Description

Empty wait strategy.

Empty wait strategy is just spinning on request field. All functions are empty.

Member Function Documentation

◆ notify()

template<typename FCKernel , typename PublicationRecord >
void cds::algo::flat_combining::wait_strategy::empty::notify ( FCKernel &  fc,
PublicationRecord &  rec 
)
inline

Wakes up the thread.

The combiner calls notify() when it has been processed the request.

FCKernel is a flat_combining::kernel object, PublicationRecord is thread's publication record of type make_publication_record::type

◆ prepare()

template<typename PublicationRecord >
void cds::algo::flat_combining::wait_strategy::empty::prepare ( PublicationRecord &  rec)
inline

Prepares the strategy.

This function is called before enter to waiting cycle. Some strategies need to prepare its thread-local data in rec.

PublicationRecord is thread's publication record of type make_publication_record::type

◆ wait()

template<typename FCKernel , typename PublicationRecord >
bool cds::algo::flat_combining::wait_strategy::empty::wait ( FCKernel &  fc,
PublicationRecord &  rec 
)
inline

Waits for the combiner.

The thread calls this function to wait for the combiner process the request. The function returns true if the thread was waked up by the combiner, otherwise it should return false.

FCKernel is a flat_combining::kernel object, PublicationRecord is thread's publication record of type make_publication_record::type

◆ wakeup()

template<typename FCKernel >
void cds::algo::flat_combining::wait_strategy::empty::wakeup ( FCKernel &  fc)
inline

Moves control to other thread.

This function is called when the thread becomes the combiner but the request of the thread is already processed. The strategy may call fc.wakeup_any() instructs the kernel to wake up any pending thread.

FCKernel is a flat_combining::kernel object,


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:14 by Doxygen 1.8.13