Lysa  0.0
Lysa 3D Engine
AsyncTasksPool Class Reference

Detailed Description

A pool of asynchronous tasks executed in background threads.

Tasks are pushed to the pool and executed in separate std::jthreads. The main loop take care of the terminated threads.

Public Member Functions

template<typename L >
void push (L &&lambda)
 
 ~AsyncTasksPool ()
 

Constructor & Destructor Documentation

~AsyncTasksPool ( )

Member Function Documentation

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.