Aether
SDL2 based UI Framework for NX
Public Member Functions | Protected Member Functions | List of all members
Aether::ThreadPool::Job Class Referenceabstract

Abstract class representing a job for the ThreadPool. It is designed to be inherited to define the job. More...

#include <ThreadPool.Job.hpp>

Inheritance diagram for Aether::ThreadPool::Job:
Aether::Texture::RenderJob

Public Member Functions

 Job ()
 Constructs a new default Job object.
 
bool run ()
 Runs the job. Does nothing if the job has already been completed. More...
 
 ~Job ()
 Destroys the Job object.
 

Protected Member Functions

virtual void work ()=0
 The work to perform. This must be defined by derived classes to actually perform the work. Invoked by run() if needed. More...
 

Detailed Description

Abstract class representing a job for the ThreadPool. It is designed to be inherited to define the job.

Member Function Documentation

◆ run()

bool Aether::ThreadPool::Job::run ( )

Runs the job. Does nothing if the job has already been completed.

Returns
true if the job was completed, false if it was previously run.

◆ work()

virtual void Aether::ThreadPool::Job::work ( )
protectedpure virtual

The work to perform. This must be defined by derived classes to actually perform the work. Invoked by run() if needed.

Note
This will only ever be executed once per job object.

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