线程锁的问题要注意一下

加锁的时候要加在while(pthread_mutex_trylock),不要简单的pthread_mutex_lock,否则在高并发下会出问题的

posted @ 2012-12-17 16:32  安子  阅读(186)  评论(0)    收藏  举报