線程同步之互斥鎖

互斥鎖是咱們用來解決線程同步的一種經常使用方法,它的頭文件在#include<pthread>中線程 1.互斥鎖的建立code pthread_mutex_t mutex;資源 2.建立完成以後須要初始化同步 pthread_mutex_init(             pthread_mutex_t* mutex;             const pthread_mutexattr_t a
相關文章
相關標籤/搜索