35#ifndef _BLAZE_UTIL_THREAD_H_
36#define _BLAZE_UTIL_THREAD_H_
57template<
typename TT,
typename MT,
typename LT,
typename CT >
class ThreadPool;
271 template<
typename Callable,
typename... Args >
272 explicit inline Thread( Callable func, Args&&... args );
348 : terminated_( false )
350 , thread_ ( nullptr )
370template<
typename Callable
424 return thread_->joinable();
490 while( pool_->executeTask() ) {}
Header file for run time assertion macros.
Base class for non-copyable class instances.
Base class for non-copyable class instances.
Definition: NonCopyable.h:64
Implementation of a thread pool.
Definition: ThreadPool.h:313
Implementation of a single thread of execution.
Definition: Thread.h:252
ThreadPoolType * pool_
Handle to the managing thread pool.
Definition: Thread.h:313
void join()
Waiting for a thread of execution to complete.
Definition: Thread.h:441
void run()
Execution function for threads in a thread pool.
Definition: Thread.h:484
ThreadHandle thread_
Handle to the thread of execution.
Definition: Thread.h:314
std::unique_ptr< ThreadType > ThreadHandle
Handle for a single thread.
Definition: Thread.h:257
~Thread()
Destructor for the Thread class.
Definition: Thread.h:396
bool hasTerminated() const
Returns whether the thread has terminated its execution.
Definition: Thread.h:460
Thread(ThreadPoolType *pool)
Starting a thread in a thread pool.
Definition: Thread.h:347
bool joinable() const
Returns whether this is a thread of execution.
Definition: Thread.h:422
TT ThreadType
Type of the encapsulated thread.
Definition: Thread.h:255
volatile bool terminated_
Thread termination flag.
Definition: Thread.h:309
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition: Assert.h:101