Igor Stasenko writes:
GC signals a semaphore after finishing (don't remember - is weak finalization process using it or different one). I'm not sure, can it somehow interfere with given case?
If weak finalization loop creates new objects, it can lead to exclusive looping in it, because user processes running with lower priority.
The problem has nothing to do with finalisation. The issue is running a GC for every allocation slows down execution a lot. Enough that there's a race to get through the test code before all 10 profiling threads start profiling. If they all start profiling then they can consume all available CPU.
Bryce