35 lines
650 B
C++
Executable File
35 lines
650 B
C++
Executable File
// License: Modified MIT (NON-AI)
|
|
// See the LICENSE file in the root directory for license information.
|
|
// Copyright 2025 Timothy Prepscius
|
|
|
|
#pragma once
|
|
|
|
#include "FilledArrayThreadSafe.h"
|
|
#include "FilledArray.hpp"
|
|
|
|
|
|
namespace tjp {
|
|
namespace core {
|
|
|
|
/**
|
|
* std list and vector and set are too slow for some reason, need fast allocation, with
|
|
*/
|
|
template<typename T, int N, typename M>
|
|
struct FilledArrayThreadSafe : FilledArray<T,N>
|
|
{
|
|
typedef FilledArray<T,N> Super;
|
|
typedef M Mutex;
|
|
Mutex m;
|
|
|
|
template<typename ... U>
|
|
FilledArrayThreadSafe(U&& ...u) :
|
|
Super(std::forward<U>(u)...)
|
|
{
|
|
|
|
}
|
|
} ;
|
|
|
|
} // namespace utilities
|
|
} // namespace
|
|
|