AWS SDK for C++

AWS SDK for C++ Version 1.11.924

Loading...
Searching...
No Matches
Aws::Utils::Threading::Executor Class Referenceabstract

#include <Executor.h>

Inheritance diagram for Aws::Utils::Threading::Executor:
[legend]

Public Member Functions

virtual ~Executor ()=default
 
template<class Fn , class ... Args>
bool Submit (Fn &&fn, Args &&... args)
 
bool Submit (std::function< void()> &&callable)
 
virtual void WaitUntilStopped ()
 

Protected Member Functions

virtual bool SubmitToThread (std::function< void()> &&)=0
 

Detailed Description

Interface for implementing an Executor, to implement a custom thread execution strategy, inherit from this class and override SubmitToThread().

Definition at line 24 of file Executor.h.

Constructor & Destructor Documentation

◆ ~Executor()

virtual Aws::Utils::Threading::Executor::~Executor ( )
virtualdefault

Member Function Documentation

◆ Submit() [1/2]

template<class Fn , class ... Args>
bool Aws::Utils::Threading::Executor::Submit ( Fn && fn,
Args &&... args )
inline

Send function and its arguments to the SubmitToThread function.

Definition at line 33 of file Executor.h.

◆ Submit() [2/2]

bool Aws::Utils::Threading::Executor::Submit ( std::function< void()> && callable)
inline

Definition at line 40 of file Executor.h.

◆ SubmitToThread()

virtual bool Aws::Utils::Threading::Executor::SubmitToThread ( std::function< void()> && )
protectedpure virtual

To implement your own executor implementation, then simply subclass Executor and implement this method.

Implemented in Aws::Utils::Threading::DefaultExecutor, Aws::Utils::Threading::PooledThreadExecutor, and Aws::Utils::Threading::SameThreadExecutor.

◆ WaitUntilStopped()

virtual void Aws::Utils::Threading::Executor::WaitUntilStopped ( )
inlinevirtual

Call to wait until all tasks have finished.

Reimplemented in Aws::Utils::Threading::DefaultExecutor, Aws::Utils::Threading::PooledThreadExecutor, and Aws::Utils::Threading::SameThreadExecutor.

Definition at line 48 of file Executor.h.


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