Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::Job Class Reference

Represents a job that encapsulates a task to be executed. More...

#include <Job.h>

Public Types

using Task = std::function<void()>

Public Member Functions

 Job (Task task)
 Constructs a Job with a given task.
void Execute ()
 Executes the job's task.

Detailed Description

Represents a job that encapsulates a task to be executed.

A job is a simple wrapper around a std::function that represents a unit of work to be executed. The task is executed via the Execute() method.

Member Typedef Documentation

◆ Task

using Raven::Job::Task = std::function<void()>

Constructor & Destructor Documentation

◆ Job()

Raven::Job::Job ( Task task)
inlineexplicit

Constructs a Job with a given task.

Parameters
taskThe task to be executed by the Job.

Member Function Documentation

◆ Execute()

void Raven::Job::Execute ( )
inline

Executes the job's task.

Calls the task that was passed during the creation of the Job.


The documentation for this class was generated from the following file:
  • Engine/src/Raven/Job/Job.h