Public Member Functions | Private Member Functions | Private Attributes | List of all members
absl::synchronization_internal::ThreadPool Class Reference

#include <thread_pool.h>

Public Member Functions

ThreadPooloperator= (const ThreadPool &)=delete
 
void Schedule (std::function< void()> func)
 
 ThreadPool (int num_threads)
 
 ThreadPool (const ThreadPool &)=delete
 
 ~ThreadPool ()
 

Private Member Functions

std::queue< std::function< void()> > queue_ GUARDED_BY (mu_)
 
bool WorkAvailable () const EXCLUSIVE_LOCKS_REQUIRED(mu_)
 
void WorkLoop ()
 

Private Attributes

absl::Mutex mu_
 
std::vector< std::thread > threads_
 

Detailed Description

Definition at line 32 of file thread_pool.h.

Constructor & Destructor Documentation

absl::synchronization_internal::ThreadPool::ThreadPool ( int  num_threads)
inlineexplicit

Definition at line 34 of file thread_pool.h.

absl::synchronization_internal::ThreadPool::ThreadPool ( const ThreadPool )
delete
absl::synchronization_internal::ThreadPool::~ThreadPool ( )
inline

Definition at line 43 of file thread_pool.h.

Member Function Documentation

std::queue<std::function<void()> > queue_ absl::synchronization_internal::ThreadPool::GUARDED_BY ( mu_  )
private
ThreadPool& absl::synchronization_internal::ThreadPool::operator= ( const ThreadPool )
delete
void absl::synchronization_internal::ThreadPool::Schedule ( std::function< void()>  func)
inline

Definition at line 56 of file thread_pool.h.

bool absl::synchronization_internal::ThreadPool::WorkAvailable ( ) const
inlineprivate

Definition at line 63 of file thread_pool.h.

void absl::synchronization_internal::ThreadPool::WorkLoop ( )
inlineprivate

Definition at line 67 of file thread_pool.h.

Member Data Documentation

absl::Mutex absl::synchronization_internal::ThreadPool::mu_
private

Definition at line 83 of file thread_pool.h.

std::vector<std::thread> absl::synchronization_internal::ThreadPool::threads_
private

Definition at line 85 of file thread_pool.h.


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


abseil_cpp
Author(s):
autogenerated on Wed Jun 19 2019 19:20:00