LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::LThread< TPlatformType > Class Template Reference

#include <Thread.h>

Inheritance diagram for LkEngine::LThread< TPlatformType >:
LkEngine::IThread

Public Member Functions

template<typename TCallable , typename ... TArgs>
 LThread (TCallable &&Func, TArgs &&... Args)
 
template<typename TCallable , typename ... TArgs>
void Setup (TCallable &&Func, TArgs &&... Args)
 Setup thread. Used whenever the thread function hasn't been passed in the constructor.
 
FORCEINLINE void Run ()
 
FORCEINLINE FThreadHandle GetHandle () const
 Get the thread handle.
 
FORCEINLINE bool IsRunning () const
 Check if the thread is running.
 
- Public Member Functions inherited from LkEngine::IThread

Static Public Member Functions

template<typename TRep , typename TPeriod >
static void Sleep (const std::chrono::duration< TRep, TPeriod > Duration)
 Sleep for a duration, inhibiting thread execution. Uses std::chrono.
 

Protected Attributes

FThreadHandle Handle = 0
 
std::thread WorkerThread
 
std::optional< std::function< void()> > Task
 
bool bIsRunning = false
 

Detailed Description

template<typename TPlatformType>
class LkEngine::LThread< TPlatformType >

Thread implementation, platform-specific.

Member Function Documentation

◆ GetHandle()

template<typename TPlatformType >
FORCEINLINE FThreadHandle LkEngine::LThread< TPlatformType >::GetHandle ( ) const
inlinevirtual

Get the thread handle.

Implements LkEngine::IThread.

◆ IsRunning()

template<typename TPlatformType >
FORCEINLINE bool LkEngine::LThread< TPlatformType >::IsRunning ( ) const
inlinevirtual

Check if the thread is running.

Implements LkEngine::IThread.

◆ Run()

template<typename TPlatformType >
FORCEINLINE void LkEngine::LThread< TPlatformType >::Run ( )
inlinevirtual

Implements LkEngine::IThread.


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