Mutex names - best practice?
问题 Related to this question, what is the best practice for naming a mutex? I realize this may vary with OS and even with version (esp for Windows), so please specify platform in answering. My interest is in Win XP and Vista. 回答1: A really safe name for a global mutex is <a description> + <a GUID> : MyApp Single Instance Mutex : {c96f7db4-d743-4718-bef0-8533a198bcca} By using a name like this there is absolutely no chance someone else will use the same mutex name as your mutex. Sniffing around