|
| | SafeQueue (std::size_t capacity=10) |
| | Constructor for the SafeQueue.
|
| |
| void | push (T value) |
| | Push a value to the queue.
|
| |
| std::optional< T > | try_pop () |
| | Try to pop a value from the queue.
|
| |
| bool | try_pop (T &value) |
| | Try to pop a value from the queue.
|
| |
| boost::optional< T > | wait_and_pop () |
| | Wait for a value to be available in the queue.
|
| |
| void | wait_and_pop (T &value) |
| | Wait for a value to be available in the queue for a given timeout.
|
| |
| boost::optional< T > | wait_and_pop_for (const std::chrono::milliseconds &timeout) |
| | Wait for a value to be available in the queue for a given timeout.
|
| |
| bool | wait_and_pop_for (const std::chrono::milliseconds &timeout, T &value) |
| | Wait for a value to be available in the queue for a given timeout.
|
| |
| bool | empty () const |
| |
template<typename T>
class ros2_canopen::SafeQueue< T >
Thread Safe Queue for CANOpen Data Exchange.
- Template Parameters
-
| T | Type of the data to be exchanged |
This class is a wrapper around boost::lockfree::queue to provide thread safe data exchange between threads using the queue.