windows多线程加锁

mutex = CreateMutex(NULL, false, NULL);

WaitForSingleObject(mutex, INFINITE);

ReleaseMutex(mutex);

CloseHandle(mutex);

posted @ 2021-08-11 14:40  MoonXu  阅读(246)  评论(0编辑  收藏  举报