A better way to do concurrent programming

Posted by Alex.Davies on Simple Talk See other posts from Simple Talk or by Alex.Davies
Published on Sun, 18 Apr 2010 11:27:00 GMT Indexed on 2010/04/18 12:34 UTC
Read the original article Hit count: 415

Filed under:

Programming to take advantage of multicore processors is hard. If you let multiple threads access the same memory, bad things happen. To avoid this, you use the lock keyword, but if you use that in the wrong way, your code deadlocks. It's all a nightmare.

Luckily, there's a better way - Actors. They're really easy to think about. They're really safe (if you follow a couple of simple rules).

And high-performance, type-safe actors are now available for .NET by using this open-source library:

http://code.google.com/p/n-act/

Have a look at the site for details. I'll blog with more reasons to use actors and tips and tricks to get the best parallelism from them soon.

© Simple Talk or respective owner