HANDLE hMutex;
hMutex=CreateMutex(NULL,TRUE,NULL); //TRUE表示调用CreateMutex的线程拥有了互斥对象
WaitForSingleObject(hMutex,INFINITE);//线程多次拥有互斥对象, 主要通过互斥对象内的计数器实现
ReleaseMutex(hMutex); //申请两次则要释放两次
ReleaseMutex(hMutex); //谁申请谁释放
WaitForSingleObject(hMutex,INFINITE); //获取信号量
EnQueue(pq,temp);///处理内容ReleaseMutex(hMutex); //释放信号量