Five ways to insert concurrency to a program written in C#

Main Article Content

DOI

Paweł Szyszko

pawel.szyszko24@gmail.com

Jakub Smołka

j.smolka@pollub.pl

Abstract

Nowadays processors working in personal computers and mobile devices allow for more and more effective parallel computing. Developers have at their disposal many different methods of implementing concurrency, but usually use the one, that they now best. It is beneficial to know, when a particular technique is good and when it is better to find an alternative. This paper presents different ways of implementing parallel mathematical calculations using threads, tasks, thread pool, task pool and parallel for loop. Each method was used in a C# application running on Windows Presentation Foundation engine on .NET platform. Implemented operation is calculation value of Pi using Leibnitz’s formula.

Keywords:

parallel programming; .Net; C#; pi

References

Article Details

Szyszko, P., & Smołka, J. (2018). Five ways to insert concurrency to a program written in C# . Journal of Computer Sciences Institute, 6, 62–67. https://doi.org/10.35784/jcsi.641