AWS SDK for C++

AWS SDK for C++ Version 1.11.792

Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Aws::Utils::Threading::SameThreadExecutor Class Reference

#include <SameThreadExecutor.h>

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

Public Member Functions

 
void WaitUntilStopped () override
 

Public Member Functions inherited from Aws::Utils::Threading::Executor

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

Protected Types

using TaskFunc = std::function< void()>
 

Protected Member Functions

bool SubmitToThread (std::function< void()> &&task) override
 

Protected Attributes

 

Detailed Description

An executor that does not spawn any thread, instead, tasks are executed in the current thread TODO: add await functionality to avoid deadlocking if thread waits for another async task.

Definition at line 23 of file SameThreadExecutor.h.

Member Typedef Documentation

◆ TaskFunc

protected

Definition at line 31 of file SameThreadExecutor.h.

Constructor & Destructor Documentation

◆ ~SameThreadExecutor()

virtual Aws::Utils::Threading::SameThreadExecutor::~SameThreadExecutor ( )
virtual

Member Function Documentation

◆ SubmitToThread()

bool Aws::Utils::Threading::SameThreadExecutor::SubmitToThread ( std::function< void()> &&  )
overrideprotectedvirtual

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

Implements Aws::Utils::Threading::Executor.

◆ WaitUntilStopped()

void Aws::Utils::Threading::SameThreadExecutor::WaitUntilStopped ( )
overridevirtual

Call to wait until all tasks have finished.

Reimplemented from Aws::Utils::Threading::Executor.

Member Data Documentation

◆ m_tasks

Aws::List<TaskFunc> Aws::Utils::Threading::SameThreadExecutor::m_tasks
protected

Definition at line 32 of file SameThreadExecutor.h.


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