by snak · 5y ago · 0 comments
int x = 0;
Parallel.For(0, 99999, z => {
x++;
});
Console.WriteLine(x);
Something as simple as an integer sum won't produce the expected output unless you're using Interlocked increments.And that definetely does not match what oblio means with "have the programming language Do The Right Thing with no further hassle".
No comments yet.