Check if the thread suspend correctly. Fixes shutdown race in mono testsuite.