neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::async_thread Class Reference

#include <async_thread.hpp>

Inheritance diagram for neolib::async_thread:
neolib::thread neolib::i_thread neolib::waitable neolib::noncopyable neogfx::async_thread neogfx::app_thread

Public Member Functions

 async_thread (async_task &aTask, const std::string &aName="", bool aAttachToCurrentThread=false)
 
 ~async_thread ()
 
- Public Member Functions inherited from neolib::thread
 thread (const std::string &aName="", bool aAttachToCurrentThread=false)
 
 thread (std::function< void()> aExecFunction, const std::string &aName="")
 
virtual ~thread ()
 
const std::string & name () const noexcept override
 
bool using_existing_thread () const noexcept
 
void start ()
 
void cancel ()
 
void abort (bool aWait=true) override
 
void wait () const
 
wait_result wait (const waitable_event_list &aEventList) const
 
bool msg_wait (const i_message_queue &aMessageQueue) const
 
wait_result msg_wait (const i_message_queue &aMessageQueue, const waitable_event_list &aEventList) const
 
void block ()
 
void unblock ()
 
thread_state state () const noexcept override
 
bool started () const noexcept
 
bool running () const noexcept
 
bool finished () const noexcept override
 
bool aborted () const noexcept
 
bool cancelled () const noexcept
 
bool error () const noexcept
 
id_type id () const noexcept
 
bool in () const
 
bool blocked () const noexcept
 
bool has_thread_object () const noexcept
 
thread_object_typethread_object () const
 
- Public Member Functions inherited from neolib::i_thread
virtual ~i_thread ()=default
 

Protected Member Functions

void exec_preamble () override
 
void exec (yield_type aYieldType=yield_type::NoYield) override
 

Additional Inherited Members

- Public Types inherited from neolib::thread
typedef std::thread::id id_type
 
typedef std::thread thread_object_type
 
- Static Public Member Functions inherited from neolib::thread
static void sleep (const std::chrono::duration< double, std::milli > &aDuration)
 
static void yield ()
 
static uint64_t elapsed_ms () noexcept
 
static uint64_t elapsed_us () noexcept
 
static uint64_t elapsed_ns () noexcept
 
static uint64_t program_elapsed_ms () noexcept
 
static uint64_t program_elapsed_us () noexcept
 
static uint64_t program_elapsed_ns () noexcept
 

Detailed Description

Definition at line 45 of file async_thread.hpp.

Constructor & Destructor Documentation

◆ async_thread()

neolib::async_thread::async_thread ( async_task aTask,
const std::string &  aName = "",
bool  aAttachToCurrentThread = false 
)

◆ ~async_thread()

neolib::async_thread::~async_thread ( )

Member Function Documentation

◆ exec()

void neolib::async_thread::exec ( yield_type  aYieldType = yield_type::NoYield)
overrideprotectedvirtual

Implements neolib::i_thread.

◆ exec_preamble()

void neolib::async_thread::exec_preamble ( )
overrideprotectedvirtual

Implements neolib::i_thread.


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