windows多线程加锁 mutex = CreateMutex(NULL, false, NULL); WaitForSingleObject(mutex, INFINITE); ReleaseMutex(mutex); CloseHandle(mutex);