Lysa  0.0
Lysa 3D Engine
AsyncTasksPool Class Reference

Detailed Description

A pool of asynchronous tasks executed in background worker threads.

Public Member Functions

 AsyncTasksPool (size_t threadCount)
 
template<typename L >
void push (L &&lambda)
 
bool haveRunningTasks () const
 
 ~AsyncTasksPool ()
 
 AsyncTasksPool (const AsyncTasksPool &) = delete
 
AsyncTasksPool & operator= (const AsyncTasksPool &) = delete
 

Constructor & Destructor Documentation

AsyncTasksPool ( size_t  threadCount)

Creates a new pool with a given number of worker threads

~AsyncTasksPool ( )
AsyncTasksPool ( const AsyncTasksPool &  )
delete

Member Function Documentation

bool haveRunningTasks ( ) const
inline
AsyncTasksPool& operator= ( const AsyncTasksPool &  )
delete
void push ( L &&  lambda)
inline

Pushes a task to the pool.

Template Parameters
LThe type of the task (usually a lambda).
Parameters
lambdaThe task to be executed.