Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

16
  • 25
    Some people when confronted with a problem think I will use multi threading. Now they have twolm probes Commented May 25, 2012 at 8:08
  • 21
    what works well for me is to get rid of mutability whenever possible. When I see mutable object changing state in order to pass the new value, I try to refactor that into passing a new immutable object holding changed value instead. If object initialization is done safely, this guarantees the absence of data races - quite a relief Commented May 25, 2012 at 8:19
  • 3
    Welcome to multi-thread hell. I've been writing multi-thread / paralell programs for > 20 years, in Ada, Occam, C++. It's never easy, everything requires very careful thought, and anyone who says "its easy just do X" is a fool who does not really understand what is going on. Good luck. Commented May 25, 2012 at 8:52
  • 2
    If you want to see concurrency done well use Erlang! In truth what you want is some form of a shared nothing actor model where the weird corner cases are going to be eliminated. Commented May 25, 2012 at 10:16
  • 3
    @DeadMG I would contend that shared state concurrency is inherently prone to weird corner cases and should be avoided. But Hey I wrote a book on Erlang Commented May 25, 2012 at 11:08