AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::utils::WaitEvent Class Reference

#include <WaitEvent.h>

Public Member Functions

 WaitEvent ()
void wakeUp ()
bool wait (const std::chrono::milliseconds &timeout)
void reset ()

Detailed Description

Class that can be used to wait for an event.

After the first wakeUp call, any call to wait will no longer block. Use reset() to reset the internal state and allow wait to block again.

Constructor & Destructor Documentation

◆ WaitEvent()

alexaClientSDK::avsCommon::utils::WaitEvent::WaitEvent ( )


Member Function Documentation

◆ reset()

void alexaClientSDK::avsCommon::utils::WaitEvent::reset ( )

Reset the event occurrence flag.

◆ wait()

std::cv_status alexaClientSDK::mediaPlayer::android::test::WaitEvent::wait ( const std::chrono::milliseconds &  timeout)

Wait for wake up event.

timeoutThe maximum amount of time to wait for the event.
true if wakeUp has been called within the timeout; false otherwise.

◆ wakeUp()

void alexaClientSDK::mediaPlayer::android::test::WaitEvent::wakeUp ( )

Notify all threads that are waiting for this event.

This method will also set the m_wakeUpTriggered to true to ensure that the waiting thread will not wait forever in case there is a race condition and wakeUp() is triggered before the wait().

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

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