Move solution and projects to src
This commit is contained in:
20
src/Ryujinx.Common/Pools/ThreadStaticArray.cs
Normal file
20
src/Ryujinx.Common/Pools/ThreadStaticArray.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Common.Pools
|
||||
{
|
||||
public static class ThreadStaticArray<T>
|
||||
{
|
||||
[ThreadStatic]
|
||||
private static T[] _array;
|
||||
|
||||
public static ref T[] Get()
|
||||
{
|
||||
if (_array == null)
|
||||
{
|
||||
_array = new T[1];
|
||||
}
|
||||
|
||||
return ref _array;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user