GRPC C++  1.0.0
Data Structures | Public Member Functions
grpc::Alarm Class Reference

A thin wrapper around grpc_alarm (see / / src/core/surface/alarm.h). More...

#include <alarm.h>

Public Member Functions

template<typename T >
 Alarm (CompletionQueue *cq, const T &deadline, void *tag)
 Create a completion queue alarm instance associated to cq. More...
 
 ~Alarm ()
 Destroy the given completion queue alarm, cancelling it in the process. More...
 
void Cancel ()
 Cancel a completion queue alarm. More...
 

Detailed Description

A thin wrapper around grpc_alarm (see / / src/core/surface/alarm.h).

Constructor & Destructor Documentation

template<typename T >
grpc::Alarm::Alarm ( CompletionQueue cq,
const T &  deadline,
void *  tag 
)
inline

Create a completion queue alarm instance associated to cq.

Once the alarm expires (at deadline) or it's cancelled (see Cancel), an event with tag tag will be added to cq. If the alarm expired, the event's success bit will be true, false otherwise (ie, upon cancellation).

.

grpc::Alarm::~Alarm ( )
inline

Destroy the given completion queue alarm, cancelling it in the process.

Member Function Documentation

void grpc::Alarm::Cancel ( )
inline

Cancel a completion queue alarm.

Calling this function over an alarm that has already fired has no effect.


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