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

Public Member Functions

 SynchronizedInvocation ()
 
void invoke ()
 
bool wait (const std::chrono::milliseconds timeout)
 

Detailed Description

A utility class to simplify capturing that the invocation of an event has occurred. This class expects that two threads are involved - thread A waits for the invocation, while thread B performs the invocation.

Constructor & Destructor Documentation

◆ SynchronizedInvocation()

alexaClientSDK::capabilityAgents::mrm::test::SynchronizedInvocation::SynchronizedInvocation ( )
inline

Constructor.

Member Function Documentation

◆ invoke()

void alexaClientSDK::capabilityAgents::mrm::test::SynchronizedInvocation::invoke ( )
inline

Record that the invocation has occurred. Calling this function will wake any waiting threads.

◆ wait()

bool alexaClientSDK::capabilityAgents::mrm::test::SynchronizedInvocation::wait ( const std::chrono::milliseconds  timeout)
inline

Wait for an invocation to occur. If it has already occurred, this function will immediately return true. If the invocation did occur, then this function resets its tracking data, allowing this object to be used repeatedly.

Parameters
timeoutHow long the caller wishes to wait for the invocation to occur.
Returns
Whether the invocation occurred within the timeout, or if it has already occurred before the call.

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

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