Core Library  1.7.0.0
Library containing core utilities and tools for threading, networking, logging, INI and CSV file management etc.
core_lib::threads::JoinThreadsP< C > Class Template Referencefinal

Class to manage joining multiple threads held as pointers in an STL container. More...

#include <JoinThreads.h>

Public Types

using container_type = C< std::thread *, std::allocator< std::thread * > >
 typedef for container type
 

Public Member Functions

 JoinThreadsP (container_type &threads)
 Initialisation constructor. More...
 
 JoinThreadsP (const JoinThreadsP &)=delete
 Copy constructor deleted.
 
JoinThreadsPoperator= (const JoinThreadsP &)=delete
 Copy assignment operator deleted.
 
 JoinThreadsP (JoinThreadsP &&)=delete
 Move constructor deleted.
 
JoinThreadsPoperator= (JoinThreadsP &&)=delete
 Move assignment operator deleted.
 
 ~JoinThreadsP ()
 Destructor- joins the threads.
 

Private Attributes

container_typem_threads
 Container of threads.
 

Detailed Description

template<template< class, class > class C>
class core_lib::threads::JoinThreadsP< C >

Class to manage joining multiple threads held as pointers in an STL container.

You can specify the container type in the template argument.

std::vector<std::thread*> myThreads(2);
JoinThreads<std::vector> joiner(myThreads);

Constructor & Destructor Documentation

◆ JoinThreadsP()

template<template< class, class > class C>
core_lib::threads::JoinThreadsP< C >::JoinThreadsP ( container_type threads)
inlineexplicit

Initialisation constructor.

Parameters
[in]threads- Containr of std::threads.

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