#include <thread_pool.h>
Public Member Functions | |
ThreadPool & | operator= (const ThreadPool &) |
void | Schedule (std::function< void()> func) |
ThreadPool (int num_threads) | |
ThreadPool (const ThreadPool &) | |
~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_ |
Definition at line 32 of file thread_pool.h.
absl::synchronization_internal::ThreadPool::ThreadPool | ( | int | num_threads | ) | [inline, explicit] |
Definition at line 34 of file thread_pool.h.
Definition at line 43 of file thread_pool.h.
std::queue<std::function<void()> > queue_ absl::synchronization_internal::ThreadPool::GUARDED_BY | ( | mu_ | ) | [private] |
ThreadPool& absl::synchronization_internal::ThreadPool::operator= | ( | const ThreadPool & | ) |
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 [inline, private] |
Definition at line 63 of file thread_pool.h.
void absl::synchronization_internal::ThreadPool::WorkLoop | ( | ) | [inline, private] |
Definition at line 67 of file thread_pool.h.
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.