working on dynamic wrapping, a good awaiting is on way
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user