![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Interface for asynchronous execution of functions. More...
#include <ExecutorInterface.h>
Public Member Functions | |
virtual | ~ExecutorInterface () noexcept=default |
Destructs an Executor. More... | |
virtual std::error_condition | execute (std::function< void()> &&function) noexcept=0 |
Schedules a function for execution. More... | |
virtual std::error_condition | execute (const std::function< void()> &function) noexcept=0 |
Schedules a function for execution. More... | |
Interface for asynchronous execution of functions.
This interface enables submission of functions for asynchronous execution. The implementations should use thread pool to acquire threads for running functions, and may be single- or multi-threaded.
Executors can be in normal mode, when they accept tasks, and in shutdown mode. In shutdown mode executors do not accept new tasks for processing, and any tasks, that haven't started an execution will be dropped.
|
virtualdefaultnoexcept |
Destructs an Executor.
This method awaits till all running tasks are completed, and drops all enqueued tasks that haven't started execution.
|
pure virtualnoexcept |
Schedules a function for execution.
Submits a function to be executed on an executor thread.
[in] | function | Function to execute. Function must not be empty. |
std::errc::invalid_argument | If function is empty. |
std::errc::operation_not_permitted | If executor is shutdown. |
|
pure virtualnoexcept |
Schedules a function for execution.
Submits a function to be executed on an executor thread.
[in] | function | Function to execute. Function must not be empty. |
std::errc::invalid_argument | If function is empty. |
std::errc::operation_not_permitted | If executor is shutdown. |
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0