solve 'edge' case and pass cancellation token
This commit is contained in:
parent
0472bfe58e
commit
d3dfdd6a74
15 changed files with 208 additions and 551 deletions
|
|
@ -7,11 +7,13 @@ namespace StitchATon2.Infra.Buffers;
|
|||
/// Provide non-thread safe anti GC contiguous memory.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
[Obsolete("Use immovable memory instead")]
|
||||
internal sealed unsafe class UnmanagedMemory<T> : IBuffer<T> where T : unmanaged
|
||||
{
|
||||
internal readonly T* Pointer;
|
||||
private bool _disposed;
|
||||
|
||||
|
||||
public Memory<T> Memory => throw new NotImplementedException();
|
||||
public int Length { get; }
|
||||
|
||||
public ref T this[int index] => ref Unsafe.AsRef<T>(Pointer + index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue