concurrencyc/include/counter.h
Christopher Hamer 5da509e373 initial commit
2024-07-05 17:14:16 +01:00

21 lines
247 B
C++

//
// Created by Christopher Hamer on 19/06/2024.
//
#include <mutex>
#ifndef TASK1_COUNTER_H
#define TASK1_COUNTER_H
class Counter {
public:
Counter();
int getNext();
private:
std::atomic<int> value;
};
#endif //TASK1_COUNTER_H