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.
Loading...
Searching...
No Matches
BS::this_thread::thread_info_pool Class Reference

A helper class to store information about the thread pool that owns the current thread. More...

#include <BS_thread_pool.hpp>

Public Member Functions

optional_pool operator() () const
 Get the pointer to the thread pool that owns the current thread. If this thread belongs to a BS::thread_pool object, a pointer to that object will be returned. Otherwise, for example if this thread is the main thread or an independent std::thread, std::nullopt will be returned.
 

Private Attributes

optional_pool pool = std::nullopt
 A pointer to the thread pool that owns the current thread.
 

Friends

class BS::thread_pool
 

Detailed Description

A helper class to store information about the thread pool that owns the current thread.

Member Function Documentation

◆ operator()()

optional_pool BS::this_thread::thread_info_pool::operator() ( ) const
inline

Get the pointer to the thread pool that owns the current thread. If this thread belongs to a BS::thread_pool object, a pointer to that object will be returned. Otherwise, for example if this thread is the main thread or an independent std::thread, std::nullopt will be returned.

Returns
An std::optional object, optionally containing a pointer to a thread pool. Unless you are 100% sure this thread is in a pool, first use std::optional::has_value() to check if it contains a value, and if so, use std::optional::value() to obtain that value.
140 {
141 return pool;
142 }
optional_pool pool
A pointer to the thread pool that owns the current thread.
Definition BS_thread_pool.hpp:148

The documentation for this class was generated from the following file: