16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_PROMISEFUTUREPAIR_H_ 17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_PROMISEFUTUREPAIR_H_ 28 template <
typename Type>
42 m_promise.set_value(val);
50 bool waitFor(std::chrono::milliseconds timeout) {
51 auto future = m_future;
52 return future.wait_for(timeout) == std::future_status::ready;
59 auto future = m_future;
65 std::promise<Type> m_promise;
68 std::shared_future<Type> m_future;
87 m_promise.set_value();
95 bool waitFor(std::chrono::milliseconds timeout) {
96 auto future = m_future;
97 return future.wait_for(timeout) == std::future_status::ready;
102 std::promise<void> m_promise;
105 std::shared_future<void> m_future;
112 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_PROMISEFUTUREPAIR_H_ Type getValue()
Definition: PromiseFuturePair.h:58
Definition: PromiseFuturePair.h:29
void setValue(Type val)
Definition: PromiseFuturePair.h:41
PromiseFuturePair()
Definition: PromiseFuturePair.h:34
void setValue()
Definition: PromiseFuturePair.h:86
bool waitFor(std::chrono::milliseconds timeout)
Definition: PromiseFuturePair.h:95
PromiseFuturePair()
Definition: PromiseFuturePair.h:80
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
bool waitFor(std::chrono::milliseconds timeout)
Definition: PromiseFuturePair.h:50
Type
Definition: Type.h:26