AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Classes | Functions | Variables
alexaClientSDK::avsCommon::utils::threading Namespace Reference

Namespaces

 test
 

Classes

class  ConditionVariableWrapper
 
class  Executor
 Single-thread executor implementation. More...
 
class  ExecutorInterface
 Interface for asynchronous execution of functions. More...
 
class  TaskThread
 
class  ThreadPool
 
class  WorkerThread
 

Functions

template<typename T >
static void forwardPromise (std::promise< T > &promise, std::future< T > &future) noexcept
 
template<>
void forwardPromise< void > (std::promise< void > &promise, std::future< void > &future) noexcept
 
std::shared_ptr< ExecutorInterfacecreateSingleThreadExecutor () noexcept
 Create a single-thread executor. More...
 

Variables

static const size_t DEFAULT_MAX_THREAD_POOL_THREADS = 20
 

Function Documentation

◆ createSingleThreadExecutor()

std::shared_ptr<ExecutorInterface> alexaClientSDK::avsCommon::utils::threading::createSingleThreadExecutor ( )
noexcept

Create a single-thread executor.

Returns
New executor reference or nullptr on error.

◆ forwardPromise()

template<typename T >
static void alexaClientSDK::avsCommon::utils::threading::forwardPromise ( std::promise< T > &  promise,
std::future< T > &  future 
)
inlinestaticnoexcept

Utility function which waits for a std::future to be fulfilled and forward the result to a std::promise.

Parameters
promiseThe std::promise to fulfill when future is fulfilled.
futureThe std::future on which to wait for a result to forward to promise.

◆ forwardPromise< void >()

template<>
void alexaClientSDK::avsCommon::utils::threading::forwardPromise< void > ( std::promise< void > &  promise,
std::future< void > &  future 
)
inlinenoexcept

Specialization of forwardPromise() for void types.

Parameters
promiseThe std::promise to fulfill when future is fulfilled.
futureThe std::future on which to wait before fulfilling promise.

Variable Documentation

◆ DEFAULT_MAX_THREAD_POOL_THREADS

const size_t alexaClientSDK::avsCommon::utils::threading::DEFAULT_MAX_THREAD_POOL_THREADS = 20
static

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0