add pthread check only for thread mode
Merge branch 'master' into private