Initial commit

This commit is contained in:
2024-12-08 19:04:50 +02:00
commit 4853b9ef0a
11 changed files with 295 additions and 0 deletions

22
include/producer.h Normal file
View File

@@ -0,0 +1,22 @@
//
// Created by lumijiez on 11/16/24.
//
#ifndef PRODUCER_H
#define PRODUCER_H
#include "buffer.h"
#include <semaphore>
class Producer {
public:
Producer(int id, Buffer& buffer, std::counting_semaphore<3>& sem);
void run() const;
private:
int id;
Buffer& buffer;
std::counting_semaphore<3>& producerSem;
};
#endif //PRODUCER_H