Signapse
src
BlockingQueue.h
Go to the documentation of this file.
1
//
2
// Created by ross on 18/02/2022.
3
//
4
5
#ifndef SIGNAPSE_BLOCKINGQUEUE_H
6
#define SIGNAPSE_BLOCKINGQUEUE_H
7
#include <deque>
8
#include <mutex>
9
#include <condition_variable>
10
#include "
Scene.h
"
11
12
13
template
<
typename
T>
15
23
class
BlockingQueue
{
24
public
:
25
void
Push
(T toPush);
26
T
Pop
();
27
bool
IsEmpty
();
28
int
Size
();
29
private
:
30
std::deque<T> internalQueue;
31
std::mutex mutex;
32
std::condition_variable condition;
33
};
34
35
36
#endif
//SIGNAPSE_BLOCKINGQUEUE_H
Scene.h
BlockingQueue
BlockingQueue Class.
Definition:
BlockingQueue.h:23
BlockingQueue::Push
void Push(T toPush)
Definition:
BlockingQueue.cpp:44
BlockingQueue::Size
int Size()
Definition:
BlockingQueue.cpp:34
BlockingQueue::Pop
T Pop()
Definition:
BlockingQueue.cpp:11
BlockingQueue::IsEmpty
bool IsEmpty()
Definition:
BlockingQueue.cpp:24
Generated by
1.9.3