PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
pixelbullet::audio_internal::CommandQueue Class Reference

A simple thread-safe command queue. More...

#include <command_queue.h>

Public Types

enum class  PopStatus { Command , Timeout , Closed }

Public Member Functions

bool push (std::function< void()> command)
 Push a new command into the queue.
PopStatus pop_for (std::function< void()> &command, const std::chrono::milliseconds timeout)
bool pop (std::function< void()> &command)
 Blocks until a command is available or the queue is closed.
void close ()

Detailed Description

A simple thread-safe command queue.

Member Function Documentation

◆ pop()

bool pixelbullet::audio_internal::CommandQueue::pop ( std::function< void()> & command)
inline

Blocks until a command is available or the queue is closed.

◆ push()

bool pixelbullet::audio_internal::CommandQueue::push ( std::function< void()> command)
inline

Push a new command into the queue.


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