R-Type
ISafeQueue.hpp
Go to the documentation of this file.
1 /*
2 ** EPITECH PROJECT, 2023
3 ** Plazza
4 ** File description:
5 ** ISafeQueue
6 */
7 
8 #ifndef ISAFEQUEUE_HPP_
9 #define ISAFEQUEUE_HPP_
12 template <typename T>
14 {
15  public:
17  virtual ~ISafeQueue() = default;
20  virtual void push(T value) = 0;
24  virtual bool tryPop(T &value) = 0;
27  virtual T pop() = 0;
28 };
29 #endif // ISAFEQUEUE_HPP_
Interface for queue that is thread safe.
Definition: ISafeQueue.hpp:14
virtual T pop()=0
Pop a value from the queue.
virtual void push(T value)=0
Push in queue.
virtual bool tryPop(T &value)=0
Try to pop a value from the queue.
virtual ~ISafeQueue()=default
Destructor.
@ T
Definition: Keyboard.hpp:49