Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::async::StoppableOperation< RetType, StopSourceType > Class Template Reference

The future side of async operations that can be stopped. More...

#include <Operation.hpp>

Inheritance diagram for util::async::StoppableOperation< RetType, StopSourceType >:
Collaboration diagram for util::async::StoppableOperation< RetType, StopSourceType >:

Public Member Functions

 StoppableOperation (OutcomeType *outcome)
 Construct a new Stoppable Operation object.
 
 StoppableOperation (StoppableOperation const &)=delete
 
StoppableOperationoperator= (StoppableOperation const &)=delete
 
 StoppableOperation (StoppableOperation &&)=default
 
StoppableOperationoperator= (StoppableOperation &&)=default
 
void requestStop () noexcept
 Requests the operation to stop.
 
- Public Member Functions inherited from util::async::impl::BasicOperation< StoppableOutcome< RetType, StopSourceType > >
 BasicOperation (OutcomeType *outcome)
 
 BasicOperation (BasicOperation &&)=default
 
 BasicOperation (BasicOperation const &)=delete
 
auto get ()
 
void wait ()
 
- Public Member Functions inherited from util::MoveTracker
 MoveTracker (MoveTracker &&other)
 Move constructor sets the moved-from state on other and resets the state on this
 
MoveTrackeroperator= (MoveTracker &&other)
 Move operator sets the moved-from state on other and resets the state on this
 
 MoveTracker (MoveTracker const &)=default
 
MoveTrackeroperator= (MoveTracker const &)=default
 

Additional Inherited Members

- Public Types inherited from util::async::impl::BasicOperation< StoppableOutcome< RetType, StopSourceType > >
using DataType
 
- Protected Member Functions inherited from util::MoveTracker
bool wasMoved () const noexcept
 The function to be used by clients in order to check whether the instance was moved from.
 
- Protected Attributes inherited from util::async::impl::BasicOperation< StoppableOutcome< RetType, StopSourceType > >
std::future< typename OutcomeType::DataType > future_
 

Detailed Description

template<typename RetType, typename StopSourceType>
class util::async::StoppableOperation< RetType, StopSourceType >

The future side of async operations that can be stopped.

Template Parameters
RetTypeThe return type of the operation
StopSourceTypeThe type of the stop source

Constructor & Destructor Documentation

◆ StoppableOperation()

template<typename RetType , typename StopSourceType >
util::async::StoppableOperation< RetType, StopSourceType >::StoppableOperation ( OutcomeType * outcome)
inlineexplicit

Construct a new Stoppable Operation object.

Parameters
outcomeThe outcome to wrap

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