|
|
PixelBullet
0.0.1
A C++ game engine
|
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 () |
A simple thread-safe command queue.
|
inline |
Blocks until a command is available or the queue is closed.
|
inline |
Push a new command into the queue.