concurrencyc/include/counter.h

21 lines
247 B
C
Raw Permalink Normal View History

2024-07-05 16:14:16 +00:00
//
// 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