VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::GameThreadQueue Class Reference

Callbacks worker threads hand to the game thread: Push from any thread, RunAll on the game thread. More...

#include <GameThreadQueue.hpp>

Public Member Functions

void Push (std::move_only_function< void()> completion)
 
void RunAll ()
 
void Clear ()
 

Detailed Description

Callbacks worker threads hand to the game thread: Push from any thread, RunAll on the game thread.

Definition at line 14 of file GameThreadQueue.hpp.

Member Function Documentation

◆ Clear()

void VoltMod::GameThreadQueue::Clear ( )
inline

Drops what is waiting, unrun.

Definition at line 45 of file GameThreadQueue.hpp.

References VoltMod::ReadFile().

Referenced by VoltMod::Database::Disconnect().

◆ Push()

void VoltMod::GameThreadQueue::Push ( std::move_only_function< void()>  completion)
inline

Definition at line 17 of file GameThreadQueue.hpp.

References VoltMod::ReadFile().

Referenced by VoltMod::HttpClient::Requests::Complete().

◆ RunAll()

void VoltMod::GameThreadQueue::RunAll ( )
inline

Runs what was pushed so far; anything pushed meanwhile waits for the next call.

Definition at line 25 of file GameThreadQueue.hpp.

References VoltMod::ReadFile().

Referenced by VoltMod::Database::DispatchCompletions().


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