The concept of concurrency is not an easy concept to grasp, when dealing with concurrency – the main enemy when doing any task in parallel are shared resources. This is why functional programming as a concept has gotten a lot of attention due to it’s potential in this modern age where there is an abundant amount of CPU core’s, making it much more scalable for parallel computing.
What about the
Object Oriented Approach? well, we’ve been dealing with concurrency problems for quite some time, and in
.NET, we have the we have the
Task Parallel Library (TPL). TPL makes concurrency patterns easier to implement. Let’s have a look at one of the most common problems in concurrency – race conditions.