internal static TNeedle GetNeedle(T value) { TNeedle result; if (_pool.TryGet(out result)) { result.Value = value; } else { result = NeedleHelper.CreateNeedle <T, TNeedle>(value); } return(result); }
public void Add(T item) { var needle = NeedleHelper.CreateNeedle <T, TNeedle>(item); _wrapped.Add(needle); }
public void Add(T item) { var needle = NeedleHelper.CreateNeedle <T, TNeedle>(item); _wrapped.Set(Interlocked.Increment(ref _maxIndex), needle); }