20 #ifndef CO_COMMANDQUEUE_H
21 #define CO_COMMANDQUEUE_H
25 #include <lunchbox/thread.h>
29 namespace detail {
class CommandQueue; }
60 CO_API
virtual ICommand pop(
const uint32_t timeout =
61 LB_TIMEOUT_INDEFINITE );
72 LB_TIMEOUT_INDEFINITE );
96 virtual void pump() {};
101 detail::CommandQueue*
const _impl;
105 #endif //CO_COMMANDQUEUE_H
virtual CO_API ~CommandQueue()
Destruct a new command queue.
CO_API void flush()
Flush all pending commands.
A class managing received commands.
CO_API size_t getSize() const
std::vector< ICommand > ICommands
A vector of input commands.
virtual CO_API ICommand pop(const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
Pop a command from the queue.
virtual CO_API void push(const ICommand &command)
Push a command to the queue.
CO_API bool isEmpty() const
CO_API CommandQueue()
Construct a new command queue.
virtual CO_API ICommand tryPop()
Try to pop a command from the queue.
virtual CO_API void pushFront(const ICommand &command)
Push a command to the front of the queue.
virtual CO_API ICommands popAll(const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
Pop all, but at least one command from the queue.
A thread-safe queue for ICommand buffers.