Thread test implementation