Building messages in parallel

I recently saw some code where the developer was attempting to build up messages inside tasks that were being reported outside of the task. In a sequential system it is easy enough to do this. You have various options available to you, such as message += …; StringBuilder Streams However, in a parallel system these […]

Parallelisation Talk Example – ConcurrentBag

This example shows a ConcurrentBag being populated and it being accessed while another task is still populating the bag. The ConcurrentBag class can be found in the System.Collections.Concurrent namespace In this example, the ConcurrentBag is populated in task that is running in the background. After a brief pause in order to allow the background task […]