cds
2.3.2
|
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... | |
Empty wait strategy.
Empty wait strategy is just spinning on request field. All functions are empty.
|
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
|
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
|
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
|
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,