pthread test code