cmake-template
Loading...
Searching...
No Matches
TaskHandle< ResultType > Class Template Reference

#include <task.hpp>

Public Member Functions

 TaskHandle (Task< ResultType > *task)
 Construct a new TaskHandle object. More...
 
ResultType get () const
 Retrieves the result of the task referred to by this handle. More...
 

Friends

class Exkit
 

Constructor & Destructor Documentation

◆ TaskHandle()

template<typename ResultType >
TaskHandle< ResultType >::TaskHandle ( Task< ResultType > *  task)
explicit

Construct a new TaskHandle object.

This constructor initializes a new TaskHandle object that refers to the given task. The TaskHandle can be used to access the result of the task and to specify dependencies on this task for other tasks

Parameters
taskThe task that this handle refers to

Member Function Documentation

◆ get()

template<typename ResultType >
ResultType TaskHandle< ResultType >::get

Retrieves the result of the task referred to by this handle.

This method blocks until the task has been completed and then returns the result. If the task's function threw an exception, this method will rethrow that exception when called

Returns
ResultType The result of the task, as produced by the task's function

Friends And Related Function Documentation

◆ Exkit

template<typename ResultType >
friend class Exkit
friend

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