Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
usher_cv_parallel::ScopedBackend Class Reference

RAII guard installing the backend at startup and joining workers before main() exits. More...

#include <opencv_parallel.hpp>

Public Member Functions

 ScopedBackend ()
 Ensure the OpenCV parallel backend is registered and enter a lifetime scope.
 ~ScopedBackend ()
 Exit the scope and join idle worker threads when the outermost guard ends.
 ScopedBackend (const ScopedBackend &)=delete
 Noncopyable: each guard must pair one scope entry with one exit.
ScopedBackend & operator= (const ScopedBackend &)=delete
 Nonassignable: a guard cannot transfer an active scope.

Private Attributes

std::shared_ptr< ThreadPoolBackend > backend_

Detailed Description

RAII guard installing the backend at startup and joining workers before main() exits.

Avoids leaving worker threads alive into static storage teardown in -static executables while still allowing unit tests without main() to call ensure_installed() directly.

Definition at line 443 of file opencv_parallel.hpp.

Constructor & Destructor Documentation

◆ ScopedBackend() [1/2]

usher_cv_parallel::ScopedBackend::ScopedBackend ( )
inline

Ensure the OpenCV parallel backend is registered and enter a lifetime scope.

Definition at line 446 of file opencv_parallel.hpp.

◆ ~ScopedBackend()

usher_cv_parallel::ScopedBackend::~ScopedBackend ( )
inline

Exit the scope and join idle worker threads when the outermost guard ends.

Definition at line 449 of file opencv_parallel.hpp.

◆ ScopedBackend() [2/2]

usher_cv_parallel::ScopedBackend::ScopedBackend ( const ScopedBackend & )
delete

Noncopyable: each guard must pair one scope entry with one exit.

Member Function Documentation

◆ operator=()

ScopedBackend & usher_cv_parallel::ScopedBackend::operator= ( const ScopedBackend & )
delete

Nonassignable: a guard cannot transfer an active scope.

Field Documentation

◆ backend_

std::shared_ptr<ThreadPoolBackend> usher_cv_parallel::ScopedBackend::backend_
private

Retained backend instance for symmetric scope exit.

Definition at line 457 of file opencv_parallel.hpp.


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