xrpld
Loading...
Searching...
No Matches
xrpl::AsyncObject< Derived > Class Template Reference

Mix-in to track when all pending I/O is complete. More...

Collaboration diagram for xrpl::AsyncObject< Derived >:

Classes

class  CompletionCounter
 RAII container that maintains the count of pending I/O. More...

Public Member Functions

 ~AsyncObject ()
void addReference ()
void removeReference ()

Private Member Functions

 AsyncObject ()

Private Attributes

std::atomic< int > pending_
friend Derived

Detailed Description

template<class Derived>
class xrpl::AsyncObject< Derived >

Mix-in to track when all pending I/O is complete.

Derived classes must be callable with this signature: void asyncHandlersComplete()

Definition at line 41 of file ResolverAsio.cpp.

Constructor & Destructor Documentation

◆ AsyncObject()

template<class Derived>
xrpl::AsyncObject< Derived >::AsyncObject ( )
private

Definition at line 43 of file ResolverAsio.cpp.

◆ ~AsyncObject()

template<class Derived>
xrpl::AsyncObject< Derived >::~AsyncObject ( )

Definition at line 48 of file ResolverAsio.cpp.

Member Function Documentation

◆ addReference()

template<class Derived>
void xrpl::AsyncObject< Derived >::addReference ( )

Definition at line 85 of file ResolverAsio.cpp.

◆ removeReference()

template<class Derived>
void xrpl::AsyncObject< Derived >::removeReference ( )

Definition at line 91 of file ResolverAsio.cpp.

Member Data Documentation

◆ pending_

template<class Derived>
std::atomic<int> xrpl::AsyncObject< Derived >::pending_
private

Definition at line 99 of file ResolverAsio.cpp.

◆ Derived

template<class Derived>
friend xrpl::AsyncObject< Derived >::Derived
private

Definition at line 101 of file ResolverAsio.cpp.