VOX
A little voxel engine
Loading...
Searching...
No Matches
ExecutorAccessor Class Reference

#include <ExecutorAccessor.hpp>

Collaboration diagram for ExecutorAccessor:
Collaboration graph

Public Member Functions

 ExecutorAccessor ()
 
 ~ExecutorAccessor ()
 
 ExecutorAccessor (const ExecutorAccessor &)=delete
 
ExecutorAccessoroperator= (const ExecutorAccessor &)=delete
 
 ExecutorAccessor (ExecutorAccessor &&)=delete
 
ExecutorAccessoroperator= (ExecutorAccessor &&)=delete
 
template<typename F >
uint64_t submit (F &&f)
 Submit a task to the threadpool, the task will be executed asynchronously. More...
 
void waitForAll ()
 wait for all tasks to finish More...
 
void waitForFinishedTasks ()
 wait for all finished task More...
 
void waitForTask (uint64_t id)
 wait for a specific task to finish More...
 
void waitForTasks (const std::vector< uint64_t > &ids)
 wait for a list of tasks to finish More...
 

Constructor & Destructor Documentation

◆ ExecutorAccessor() [1/3]

ExecutorAccessor::ExecutorAccessor ( )

◆ ~ExecutorAccessor()

ExecutorAccessor::~ExecutorAccessor ( )

◆ ExecutorAccessor() [2/3]

ExecutorAccessor::ExecutorAccessor ( const ExecutorAccessor )
delete

◆ ExecutorAccessor() [3/3]

ExecutorAccessor::ExecutorAccessor ( ExecutorAccessor &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

ExecutorAccessor & ExecutorAccessor::operator= ( const ExecutorAccessor )
delete

◆ operator=() [2/2]

ExecutorAccessor & ExecutorAccessor::operator= ( ExecutorAccessor &&  )
delete

◆ submit()

template<typename F >
uint64_t ExecutorAccessor::submit ( F &&  f)
inline

Submit a task to the threadpool, the task will be executed asynchronously.

Template Parameters
Freturn type of the function
Parameters
ffunction to execute
Returns
id of the task, you can use this id to wait for the task to finish

◆ waitForAll()

void ExecutorAccessor::waitForAll ( )

wait for all tasks to finish

◆ waitForFinishedTasks()

void ExecutorAccessor::waitForFinishedTasks ( )

wait for all finished task

◆ waitForTask()

void ExecutorAccessor::waitForTask ( uint64_t  id)

wait for a specific task to finish

Parameters
idid of the task to wait for

◆ waitForTasks()

void ExecutorAccessor::waitForTasks ( const std::vector< uint64_t > &  ids)

wait for a list of tasks to finish

Parameters
idsstd::vector of ids of the tasks to wait for

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