1
0
Fork 0
This repository has been archived on 2021-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
uni-m.cds-adv-prog/ex10/shared_queue.hh

19 lines
282 B
C++
Raw Normal View History

2020-07-08 16:53:53 +02:00
// Shared_Queue.hh
#include <condition_variable>
#include <mutex>
#include <queue>
#ifndef SHARED_QUEUE_HH
#define SHARED_QUEUE_HH
template <class T>
class SharedQueue
{
// Queue
std::queue<T> queue;
// Synchronisation
std::mutex mutex;
std::condition_variable cv;
};
#endif