started working on version_list replacement for atom
This commit is contained in:
parent
039df559de
commit
101b0ec12f
31
mvcc/version_list.hpp
Normal file
31
mvcc/version_list.hpp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "threading/sync/lockable.hpp"
|
||||||
|
#include "transactions/transaction.hpp"
|
||||||
|
|
||||||
|
#include "memory/lazy_gc.hpp"
|
||||||
|
|
||||||
|
namespace mvcc
|
||||||
|
{
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
class VersionList : Lockable<SpinLock>, LazyGC<VersionList<T>>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
class Accessor
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
VersionList() = default;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::atomic<T*> head;
|
||||||
|
|
||||||
|
void vacuum()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user