Trick for debugging parallel code

Thanks to Microsoft’s TPL (Task Parallel Library) writing parallel applications has become easy. In some cases it’s as easy as swapping a foreach loop...