On Thursday, 8 October 2015 at 10:11:38 UTC, Kagamin wrote:
On Thursday, 8 October 2015 at 02:31:24 UTC, bitwise wrote:
If you have System.Collections.Generic.List(T) static class
member, there is nothing wrong with using it from multiple
threads like this:
The equivalent of your D example would be
class Foo {
static List<int> numbers = new List<int>();
void bar() {
new Thread(()=>{
numbers.Add(1);
}).Start();
}
}
That still doesn't explain what you mean about it being illegal
in other languages or why you brought up C# in the first place.
Bit