StormByte 3.0.0
C++26 foundation of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Safe::Detail::ThreadState< Callable, Args > Struct Template Reference

Decayed callable and arguments, allocated on Base's heap. More...

#include <StormByte/safe/thread.hxx>

Public Member Functions

STORMBYTE_FORCE_INLINE ThreadState (Callable &&fn, Args &&... args)
 Capture the entry.

Static Public Member Functions

static STORMBYTE_FORCE_INLINE void Run (void *raw)
 Invoke and destroy the state.

Public Attributes

Callable callable
 Entry.
std::tuple< Args... > arguments
 Arguments captured before the execution starts.

Detailed Description

template<class Callable, class... Args>
struct StormByte::Safe::Detail::ThreadState< Callable, Args >

Decayed callable and arguments, allocated on Base's heap.

Template Parameters
CallableDecayed callable.
ArgsDecayed arguments.

Constructor & Destructor Documentation

◆ ThreadState()

template<class Callable, class... Args>
STORMBYTE_FORCE_INLINE StormByte::Safe::Detail::ThreadState< Callable, Args >::ThreadState ( Callable && fn,
Args &&... args )
inline

Capture the entry.

Parameters
fnEntry.
argsArguments.

Member Function Documentation

◆ Run()

template<class Callable, class... Args>
STORMBYTE_FORCE_INLINE void StormByte::Safe::Detail::ThreadState< Callable, Args >::Run ( void * raw)
inlinestatic

Invoke and destroy the state.

Parameters
rawState address. Not null.

Member Data Documentation

◆ arguments

template<class Callable, class... Args>
std::tuple<Args...> StormByte::Safe::Detail::ThreadState< Callable, Args >::arguments

Arguments captured before the execution starts.

◆ callable

template<class Callable, class... Args>
Callable StormByte::Safe::Detail::ThreadState< Callable, Args >::callable

Entry.


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