working on dynamic wrapping, a good awaiting is on way

This commit is contained in:
Youmu Liu
2025-11-07 18:22:50 +08:00
parent ec1b8dbd51
commit f959339e18
16 changed files with 447 additions and 355 deletions
@@ -29,6 +29,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
namespace StgSharp.Collections
{
@@ -45,6 +46,8 @@ namespace StgSharp.Collections
_index = -1;
}
public T? First => Volatile.Read(ref _index) > 0 ? _values[0] : default;
public bool IsEmpty => _index == -1;
public int Count => _index + 1;