You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.
Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.List`1.Add(T item)
at StatsdClient.Statsd.Add[TCommandType](String name, Double value)
...
I believe this may be a thread safety issue. Is access to the Commands List thread safe?
The text was updated successfully, but these errors were encountered:
I took a look at this and was able to reproduce when hitting the Add method with upwards of a million concurrent calls. ConcurrentQueue won't work here because a) we're still targeting .NET 3.5 and ConcurrentQueue is in 4.5, and b) the List type is on the IStatsd interface (unfortunately), so I don't want to break that contract for anyone.
I'll give a go at doing some basic thread locking to see if it'll solve the issue. If not, we may look at breaking the two points above and using one of the newer built in thread safe types.
The following fatal exception occurs in our app:
I believe this may be a thread safety issue. Is access to the Commands List thread safe?
The text was updated successfully, but these errors were encountered: