![]() |
Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
|
A helper class to facilitate waiting for and/or getting the results of multiple futures at once. More...
#include <BS_thread_pool.hpp>


Public Member Functions | |
| std::conditional_t< std::is_void_v< T >, void, std::vector< T > > | get () |
| Get the results from all the futures stored in this BS::multi_future, rethrowing any stored exceptions. | |
| std::size_t | ready_count () const |
| Check how many of the futures stored in this BS::multi_future are ready. | |
| bool | valid () const noexcept |
| Check if all the futures stored in this BS::multi_future are valid. | |
| void | wait () const |
| Wait for all the futures stored in this BS::multi_future. | |
| template<typename R, typename P> | |
| bool | wait_for (const std::chrono::duration< R, P > &duration) const |
| Wait for all the futures stored in this BS::multi_future, but stop waiting after the specified duration has passed. This function first waits for the first future for the desired duration. If that future is ready before the duration expires, this function waits for the second future for whatever remains of the duration. It continues similarly until the duration expires. | |
| template<typename C, typename D> | |
| bool | wait_until (const std::chrono::time_point< C, D > &timeout_time) const |
| Wait for all the futures stored in this BS::multi_future, but stop waiting after the specified time point has been reached. This function first waits for the first future until the desired time point. If that future is ready before the time point is reached, this function waits for the second future until the desired time point. It continues similarly until the time point is reached. | |
A helper class to facilitate waiting for and/or getting the results of multiple futures at once.
| T | The return type of the futures. |
|
inlinenodiscard |
Get the results from all the futures stored in this BS::multi_future, rethrowing any stored exceptions.
|
inlinenodiscard |
Check how many of the futures stored in this BS::multi_future are ready.
|
inlinenodiscardnoexcept |
Check if all the futures stored in this BS::multi_future are valid.
|
inline |
Wait for all the futures stored in this BS::multi_future.
|
inline |
Wait for all the futures stored in this BS::multi_future, but stop waiting after the specified duration has passed. This function first waits for the first future for the desired duration. If that future is ready before the duration expires, this function waits for the second future for whatever remains of the duration. It continues similarly until the duration expires.
| R | An arithmetic type representing the number of ticks to wait. |
| P | An std::ratio representing the length of each tick in seconds. |
| duration | The amount of time to wait. |
|
inline |
Wait for all the futures stored in this BS::multi_future, but stop waiting after the specified time point has been reached. This function first waits for the first future until the desired time point. If that future is ready before the time point is reached, this function waits for the second future until the desired time point. It continues similarly until the time point is reached.
| C | The type of the clock used to measure time. |
| D | An std::chrono::duration type used to indicate the time point. |
| timeout_time | The time point at which to stop waiting. |