Ported thread statics test.
Ported thread static stress test.