![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <TaskThread.h>
Public Member Functions | |
TaskThread () | |
~TaskThread () | |
bool | start (std::function< bool()> jobRunner, const std::string &moniker) |
A TaskThread executes in sequence until no more tasks exists.
TaskThread
if jobRunner returns false. alexaClientSDK::avsCommon::utils::threading::TaskThread::TaskThread | ( | ) |
Constructs a TaskThread to run tasks on a single thread. This does not start the thread.
alexaClientSDK::avsCommon::utils::threading::TaskThread::~TaskThread | ( | ) |
Destructs the TaskThread.
bool alexaClientSDK::avsCommon::utils::threading::TaskThread::start | ( | std::function< bool()> | jobRunner, |
const std::string & | moniker | ||
) |
Start executing tasks from the given job runner. The task thread will keep running until jobRunner
returns false
or start
gets called again.
jobRunner | Function that should execute jobs. The function should return true if there's more tasks to be executed. |
moniker | Thread moniker to use when executing jobRunner. All logging messages will use provided moniker for identifying the execution owner. |
true
if it succeeds to start the new jobRunner thread; false
if it fails. AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0