D
dyb
Unregistered / Unconfirmed
GUEST, unregistred user!
为解决线程互斥共享资源,我设置了三个全局变量,初始化如下:
HANDLE CaptureDataedMutex =CreateMutex(NULL,FALSE,NULL);
HANDLE CompressOutEmptyMutex =CreateMutex(NULL,FALSE,NULL);
HANDLE CompressOutDataedMutex =CreateMutex(NULL,FALSE,NULL);
但子线程一生成,CaptureDataedMutex 、CompressOutEmptyMutex 、CompressOutDataedMutex 全变为NULL,为什么?
HANDLE CaptureDataedMutex =CreateMutex(NULL,FALSE,NULL);
HANDLE CompressOutEmptyMutex =CreateMutex(NULL,FALSE,NULL);
HANDLE CompressOutDataedMutex =CreateMutex(NULL,FALSE,NULL);
但子线程一生成,CaptureDataedMutex 、CompressOutEmptyMutex 、CompressOutDataedMutex 全变为NULL,为什么?