change condition to pthread_cond
Merge pull request #91 from MaggieQi/master

change condition to pthread_cond