← API Reference Class

template<typename _Callable, typename ... _Args> asge::concurrent::_internal::ThreadImpl

This is a thread implementation for simple thread logic.

#include <Thread.hpp>

Inherits from asge::concurrent::Thread.

Inheritance

classDiagram
    class N2["asge::concurrent::Thread"]
    class N1["asge::concurrent::_internal::ThreadImpl"]
    N2 <|-- N1
    click N2 href "classasge_1_1concurrent_1_1Thread.html"
    click N1 href "classasge_1_1concurrent_1_1__internal_1_1ThreadImpl.html"

Collaboration

classDiagram
    class N2["asge::concurrent::Thread"]
    class N1["asge::concurrent::_internal::ThreadImpl"]
    N2 <|-- N1
    click N2 href "classasge_1_1concurrent_1_1Thread.html"
    click N1 href "classasge_1_1concurrent_1_1__internal_1_1ThreadImpl.html"

It takes as input a function with all parameters and just implements the run method. I would like to point out that the only purpouse of this class is to use it as a middle point in the static "start" method of the Thread class, therefore it is suggested to not use it to create generic threads. Just use the "start" method of Thread class.

Template Parameters
_Callable

The function type

_Args

Types for each function parameter

Private Attributes

#_Callable m_Funcprivate
#std::tuple< _Args... > m_Argsprivate

Private Member Functions

#virtual void Run(context_pointer &inCtx) overrideprivate

Implements the internal thread logic.

This method must implement only the internal thread logic inside the thread loop, which is instead managed outside the particular thread implementation. Therefore, all other conditions that might be return the thread execution must be specified in this method. To cancel the thread, the Cancel function on the context shall be called.

Overrides Run

Public Member Functions

#ThreadImpl(context_pointer inCtx, _Callable &&inFunc, _Args &&... inArgs)
#~ThreadImpl() override