refactored FineList to have Node in seperate file

This commit is contained in:
2020-12-30 18:50:31 +01:00
parent 0e83584a76
commit 337ca9b169
2 changed files with 26 additions and 29 deletions

17
Assignment_2/Node.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include <mutex>
class Node {
public:
int data;
Node* next;
std::mutex mut;
public:
void lock();
void unlock();
};
void Node::lock() {
this->mut.lock();
}
void Node::unlock() {
this->mut.unlock();
}