MUTEX for C++ objects
Posted on 2005-04-06
I just had my first glance os MUTEX right now because I need to execute a service class in a multi-process enviroment that canot be instantiated again while it is running - like a singleton. The little I read is that whit MUTEX, when another prosses try to get a lock it will must wait, but the service that launchs the MUTEXed one must quit and return that the service canot be instantiated cause it´s already running. It´s can be done? and if it is possible how is the best way to protect the MUTEX "gate" from stay locked in case of the MUTEX object die abnormaly without release that lock?