Loading...
Searching...
No Matches
mce::core::ThreadFunctor< F > Struct Template Reference

Adapter that wraps a generic functor/lambda. More...

`#include <Thread.hpp>`

Inheritance diagram for mce::core::ThreadFunctor< F >:

## Public Member Functions

| ThreadFunctor (F functor)
| Construct the adapter with the provided functor.
virtual void | run () override
| Invoke the stored functor.
Public Member Functions inherited from mce::core::ThreadFunc
virtual | ~ThreadFunc ()
| Virtual destructor to allow safe deletion via base pointer.

## Public Attributes

F | functor
| The stored functor instance.

## Detailed Description

template<typename F>
struct mce::core::ThreadFunctor< F >

Adapter that wraps a generic functor/lambda.

Template Parameters

  F | Type of the functor or lambda.

## Constructor & Destructor Documentation

## ThreadFunctor()

template<typename F>

mce::core::ThreadFunctor< F >::ThreadFunctor | ( | F | functor | ) |

inline

Construct the adapter with the provided functor.

Parameters

  functor | The functor or lambda to invoke from run().

## Member Function Documentation

## run()

template<typename F>

virtual void mce::core::ThreadFunctor< F >::run | ( |  | ) |

inlineoverridevirtual

Invoke the stored functor.

Implements mce::core::ThreadFunc.

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

- Minecraft-Community-Edition/Core/Thread.hpp