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
CPPHTTPLIB_NAMESPACE::ThreadPool::worker Struct Reference
Collaboration diagram for CPPHTTPLIB_NAMESPACE::ThreadPool::worker:

Public Member Functions

 worker (ThreadPool &pool)
void operator() ()

Public Attributes

ThreadPool & pool_

Constructor & Destructor Documentation

◆ worker()

CPPHTTPLIB_NAMESPACE::ThreadPool::worker::worker ( ThreadPool & pool)
inlineexplicit
282422: pool_(pool) {}

Member Function Documentation

◆ operator()()

void CPPHTTPLIB_NAMESPACE::ThreadPool::worker::operator() ( )
inline
282424 {
282425 for (;;) {
282426 std::function<void()> fn;
282427 {
282428 duckdb::unique_lock<std::mutex> lock(pool_.mutex_);
282429
282430 pool_.cond_.wait(
282431 lock, [&] { return !pool_.jobs_.empty() || pool_.shutdown_; });
282432
282433 if (pool_.shutdown_ && pool_.jobs_.empty()) { break; }
282434
282435 fn = pool_.jobs_.front();
282436 pool_.jobs_.pop_front();
282437 }
282438
282439 assert(true == static_cast<bool>(fn));
282440 fn();
282441 }
282442
282443#if defined(CPPHTTPLIB_OPENSSL_SUPPORT) && !defined(OPENSSL_IS_BORINGSSL) && \
282444 !defined(LIBRESSL_VERSION_NUMBER)
282445 OPENSSL_thread_stop();
282446#endif
282447 }
#define assert(x)
Definition duckdb.cpp:486071

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