top | item 21082241

(no title)

codernyc16 | 6 years ago

The example did not have threaded code so I find your nitpick unfair. The usage of random in their examples is perfectly fine.

discuss

order

ben509|6 years ago

If the site is providing toy examples that are not useful in production, then it should state that.

If "idioms" mean code that adheres to best practices, given that C# code is frequently threaded, their examples should mitigate common threading issues.

wruza|6 years ago

>then it should state that.

It will be ignored. StackOverflow guys and all participants have put an enormous effort into making it at least partially trusted source of snippets, and I hope it will never be outranked by sites like this.

(to creator: sorry for this, but in a long run it only harms everyone, unless you “die” for it)

marshray|6 years ago

If the language runtime supports threading, in the absence of explicit documentation, code that assumes single thread access is broken.