This class is meant to be used similar to a shared future, but the value can be set any number of times. More...
#include <RecurrentSharedFuture.h>
Inheritance diagram for carla::RecurrentSharedFuture< T >:
Collaboration diagram for carla::RecurrentSharedFuture< T >:Classes | |
| struct | mapped_type |
Public Types | |
| using | SharedException = detail::SharedException |
Public Member Functions | |
| template<typename ExceptionT > | |
| void | SetException (ExceptionT &&exception) |
| Set a exception, this exception will be thrown on all the threads waiting. More... | |
| template<typename T2 > | |
| void | SetValue (const T2 &value) |
| Set the value and notify all waiting threads. More... | |
| boost::optional< T > | WaitFor (time_duration timeout) |
| Wait until the next value is set. More... | |
Private Attributes | |
| 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.
Definition at line 43 of file RecurrentSharedFuture.h.
| using carla::RecurrentSharedFuture< T >::SharedException = detail::SharedException |
Definition at line 46 of file RecurrentSharedFuture.h.
| void carla::RecurrentSharedFuture< T >::SetException | ( | ExceptionT && | exception | ) |
Set a exception, this exception will be thrown on all the threads waiting.
Definition at line 139 of file RecurrentSharedFuture.h.
Referenced by TEST().
Here is the caller graph for this function:| void carla::RecurrentSharedFuture< T >::SetValue | ( | const T2 & | value | ) |
Set the value and notify all waiting threads.
Definition at line 128 of file RecurrentSharedFuture.h.
Referenced by TEST().
Here is the caller graph for this function:| 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.
Definition at line 113 of file RecurrentSharedFuture.h.
Referenced by TEST().
Here is the caller graph for this function:
|
private |
Definition at line 70 of file RecurrentSharedFuture.h.
|
private |
Definition at line 77 of file RecurrentSharedFuture.h.
|
private |
Definition at line 68 of file RecurrentSharedFuture.h.
1.8.13