AlexaClientSDK  1.26.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
 
class  TaskThread
 
class  ThreadPool
 
class  WorkerThread
 

Functions

template<typename T >
static void forwardPromise (std::shared_ptr< std::promise< T >> promise, std::future< T > *future)
 
template<>
void forwardPromise< void > (std::shared_ptr< std::promise< void >> promise, std::future< void > *future)
 
static const std::string TAG (ConditionVariableWrapper::getTag())
 String to identify log entries originating from this file. More...
 

Variables

static const size_t DEFAULT_MAX_THREAD_POOL_THREADS = 20
 
static std::atomic< uint64_t > g_id {0}
 An id for identifying instances. More...
 
static ThreadPool SINGLETON_THREAD_POOL {}
 

Function Documentation

◆ forwardPromise()

template<typename T >
static void alexaClientSDK::avsCommon::utils::threading::forwardPromise ( std::shared_ptr< std::promise< T >>  promise,
std::future< T > *  future 
)
inlinestatic

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::shared_ptr< std::promise< void >>  promise,
std::future< void > *  future 
)
inline

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.

◆ TAG()

static const std::string alexaClientSDK::avsCommon::utils::threading::TAG ( ConditionVariableWrapper::getTag()  )
static

String to identify log entries originating from this file.

Variable Documentation

◆ DEFAULT_MAX_THREAD_POOL_THREADS

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

◆ g_id

std::atomic<uint64_t> alexaClientSDK::avsCommon::utils::threading::g_id {0}
static

An id for identifying instances.

◆ SINGLETON_THREAD_POOL

ThreadPool alexaClientSDK::avsCommon::utils::threading::SINGLETON_THREAD_POOL {}
static

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