CARLA
 
载入中...
搜索中...
未找到
| Public 类型 | Public 成员函数 | Private 属性 | 所有成员列表
carla::RecurrentSharedFuture< T > 模板类 参考

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>

+ 类 carla::RecurrentSharedFuture< T > 继承关系图:
+ carla::RecurrentSharedFuture< T > 的协作图:

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
 

详细描述

template<typename T>
class carla::RecurrentSharedFuture< T >

This class is meant to be used similar to a shared future, but the value can be set any number of times.

在文件 RecurrentSharedFuture.h43 行定义.

成员类型定义说明

◆ SharedException

template<typename T >
using carla::RecurrentSharedFuture< T >::SharedException = detail::SharedException

在文件 RecurrentSharedFuture.h46 行定义.

成员函数说明

◆ SetException()

template<typename T >
template<typename ExceptionT >
void carla::RecurrentSharedFuture< T >::SetException ( ExceptionT && exception)

Set a exception, this exception will be thrown on all the threads waiting.

注解
The exception will be stored on a SharedException and thrown as such.

在文件 RecurrentSharedFuture.h139 行定义.

被这些函数引用 TEST().

+ 这是这个函数的调用关系图:

◆ SetValue()

template<typename T >
template<typename T2 >
void carla::RecurrentSharedFuture< T >::SetValue ( const T2 & value)

Set the value and notify all waiting threads.

在文件 RecurrentSharedFuture.h128 行定义.

被这些函数引用 TEST().

+ 这是这个函数的调用关系图:

◆ WaitFor()

template<typename T >
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.

返回
empty optional if the timeout is met.

在文件 RecurrentSharedFuture.h113 行定义.

引用了 carla::detail::thread_tag, carla::throw_exception() , 以及 carla::time_duration::to_chrono().

被这些函数引用 TEST(), TEST() , 以及 TEST().

+ 函数调用图:
+ 这是这个函数的调用关系图:

类成员变量说明

◆ _cv

template<typename T >
std::condition_variable carla::RecurrentSharedFuture< T >::_cv
private

在文件 RecurrentSharedFuture.h70 行定义.

◆ _map

template<typename T >
std::map<const char *, mapped_type> carla::RecurrentSharedFuture< T >::_map
private

在文件 RecurrentSharedFuture.h77 行定义.

◆ _mutex

template<typename T >
std::mutex carla::RecurrentSharedFuture< T >::_mutex
private

在文件 RecurrentSharedFuture.h68 行定义.


该类的文档由以下文件生成: