This class is meant to be used similar to a shared future, but the value can be set any number of times. 更多...
#include <RecurrentSharedFuture.h>
类 | |
struct | mapped_type |
Public 类型 | |
using | SharedException = detail::SharedException |
Public 成员函数 | |
template<typename ExceptionT > | |
void | SetException (ExceptionT &&exception) |
Set a exception, this exception will be thrown on all the threads waiting. | |
template<typename T2 > | |
void | SetValue (const T2 &value) |
Set the value and notify all waiting threads. | |
boost::optional< T > | WaitFor (time_duration timeout) |
Wait until the next value is set. | |
Private 属性 | |
std::condition_variable | _cv |
std::map< const char *, mapped_type > | _map |
std::mutex | _mutex |
This class is meant to be used similar to a shared future, but the value can be set any number of times.
在文件 RecurrentSharedFuture.h 第 43 行定义.
using carla::RecurrentSharedFuture< T >::SharedException = detail::SharedException |
在文件 RecurrentSharedFuture.h 第 46 行定义.
void carla::RecurrentSharedFuture< T >::SetException | ( | ExceptionT && | exception | ) |
Set a exception, this exception will be thrown on all the threads waiting.
在文件 RecurrentSharedFuture.h 第 139 行定义.
被这些函数引用 TEST().
void carla::RecurrentSharedFuture< T >::SetValue | ( | const T2 & | value | ) |
Set the value and notify all waiting threads.
在文件 RecurrentSharedFuture.h 第 128 行定义.
被这些函数引用 TEST().
boost::optional< T > carla::RecurrentSharedFuture< T >::WaitFor | ( | time_duration | timeout | ) |
Wait until the next value is set.
Any number of threads can be waiting simultaneously.
在文件 RecurrentSharedFuture.h 第 113 行定义.
引用了 carla::detail::thread_tag, carla::throw_exception() , 以及 carla::time_duration::to_chrono().
被这些函数引用 TEST(), TEST() , 以及 TEST().
|
private |
在文件 RecurrentSharedFuture.h 第 70 行定义.
|
private |
在文件 RecurrentSharedFuture.h 第 77 行定义.
|
private |
在文件 RecurrentSharedFuture.h 第 68 行定义.