﻿#pragma once
#include <atomic>
#include <mutex>

class AtomicSequentialSingleton
{
public:
	static AtomicSequentialSingleton* getInstance();
	
	AtomicSequentialSingleton(const AtomicSequentialSingleton&) = delete;
	AtomicSequentialSingleton& operator=(const AtomicSequentialSingleton&) = delete;
	
private:
	AtomicSequentialSingleton() = default;
	~AtomicSequentialSingleton() = default;

	static std::atomic<AtomicSequentialSingleton*> instance;
	static std::mutex mutex;
};
