hlcc 2.0.0-beta2+pre1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rad::cii::CancellationToken Class Reference

#include <utils.hpp>

Public Member Functions

 CancellationToken ()
 
 CancellationToken (const CancellationToken &)=default
 
CancellationTokenoperator= (const CancellationToken &)=default
 
void Cancel ()
 
bool IsCancelled () const
 

Detailed Description

This class can be used to notify when a 'service' has been cancelled.

For example it is returned by the RouteReply() function to give the possibility to the user to check when a request has been cancelled and there is no point to keep waiting for a reply.

Remarks
This is thread compatible.

Constructor & Destructor Documentation

◆ CancellationToken() [1/2]

rad::cii::CancellationToken::CancellationToken ( )
inline

This constructor initialize the cancellation token to false.

◆ CancellationToken() [2/2]

rad::cii::CancellationToken::CancellationToken ( const CancellationToken )
default

Member Function Documentation

◆ Cancel()

void rad::cii::CancellationToken::Cancel ( )
inline

This method can be used to notify that the "service" has been cancelled.

◆ IsCancelled()

bool rad::cii::CancellationToken::IsCancelled ( ) const
inline

This method can be used to check whether the "service" has been cancelled.

Returns
true If the service has been cancelled, false otherwise.

◆ operator=()

CancellationToken & rad::cii::CancellationToken::operator= ( const CancellationToken )
default

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