Tamer
C++ language extensions for event-driven programming
Loading...
Searching...
No Matches
tamer::rendezvous< I > Class Template Reference

A set of watched events. More...

#include <tamer/tamer.hh>

Public Member Functions

 ~rendezvous ()
 Destroy rendezvous.
template<typename T0, typename T1, typename T2, typename T3>
event< T0, T1, T2, T3 > make_event (const I &eid, T0 &x0, T1 &x1, T2 &x2, T3 &x3)
template<typename T0, typename T1, typename T2>
event< T0, T1, T2 > make_event (const I &eid, T0 &x0, T1 &x1, T2 &x2)
template<typename T0, typename T1>
event< T0, T1 > make_event (const I &eid, T0 &x0, T1 &x1)
template<typename T0>
event< T0 > make_event (const I &eid, T0 &x0)
event make_event (const I &eid)
bool has_ready () const
 Test if any events are ready.
bool has_waiting () const
 Test if any events are waiting.
bool has_events () const
 Test if any events are ready or waiting.
bool join (I &eid)
 Report the next ready event.
void clear ()
 Remove all events from this rendezvous.
uintptr_t make_rid (const I &eid)

Detailed Description

template<typename I>
class tamer::rendezvous< I >

A set of watched events.

Rendezvous may also be declared with one or zero template arguments, as in rendezvous<T> or rendezvous<>. Each specialized rendezvous class has functions similar to the full-featured rendezvous, but with parameters to join appropriate to the template arguments. Specialized rendezvous implementations are often more efficient than the full rendezvous.

Member Function Documentation

◆ has_ready()

template<typename I>
bool tamer::rendezvous< I >::has_ready ( ) const
inline

Test if any events are ready.

An event is ready if it has triggered, but no join or twait has reported it yet.

◆ has_waiting()

template<typename I>
bool tamer::rendezvous< I >::has_waiting ( ) const
inline

Test if any events are waiting.

An event is waiting until it is either triggered or canceled.

◆ join()

template<typename I>
bool tamer::rendezvous< I >::join ( I & eid)
inline

Report the next ready event.

Parameters
[out]eidSet to the event ID of the ready event.
Returns
True if there was a ready event, false otherwise.

eid was modified if and only if join returns true.

◆ clear()

template<typename I>
void tamer::rendezvous< I >::clear ( )

Remove all events from this rendezvous.

Every event waiting on this rendezvous is made empty. After clear(), has_events() will return false.

Referenced by ~rendezvous().


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