I stumbled on a forum posting recently that led me to write the following code:
This program behaves badly on a single processor machine, and pegs the CPU at 100% for over two minutes. On a multi processor machine, the program finishes all the threading work in the blink of an eye - only a brief CPU spike.
Strangely, if I remove a single line of code:
… then the program performs just as well on a single processor machine (only a brief spike - comparable to the MP scenario).
Could it be a bug?