R
Rainer Queck
Hi NG,
one more question about thread safety of generic lists.
Let's assume a generic list:
List<MyTyp> aList = new List<MyType>();
Would it be a problem if one thread removes elements from the list like
MyTyp x = aList[0];
aList.Remove(x);
While in the same momen a other thread adds a elemen like
MyType y = new MyType();
aList.Add(y);
Is it safe to assume that these two operations in combination are OK?
Thanks for hints and help?
Rainer
one more question about thread safety of generic lists.
Let's assume a generic list:
List<MyTyp> aList = new List<MyType>();
Would it be a problem if one thread removes elements from the list like
MyTyp x = aList[0];
aList.Remove(x);
While in the same momen a other thread adds a elemen like
MyType y = new MyType();
aList.Add(y);
Is it safe to assume that these two operations in combination are OK?
Thanks for hints and help?
Rainer