|  | Gamedev Framework (gf) 1.2.0
    A C++17 framework for 2D games | 
A simple concurrent queue. More...
#include <gf/Queue.h>
| Public Member Functions | |
| bool | poll (T &value) | 
| Poll a value from the queue, if possible.  More... | |
| void | wait (T &value) | 
| Wait for a value from the queue.  More... | |
| void | push (const T &value) | 
| Push a value on the queue.  More... | |
| void | push (T &&value) | 
| Push a value on the queue.  More... | |
| void | clear () | 
| Clear the queue.  More... | |
A simple concurrent queue.
This is a simple concurrent queue that can be used in a multi-threaded application. For example, it can be used between a thread that receives messages from the network and the main loop that handles the messages.
| 
 | inline | 
Clear the queue.
| 
 | inline | 
Poll a value from the queue, if possible.
| value | A reference for the result | 
| 
 | inline | 
Push a value on the queue.
| value | The value to push on the queue | 
| 
 | inline | 
Push a value on the queue.
| value | The value to push on the queue | 
| 
 | inline | 
Wait for a value from the queue.
| value | A reference for the result |