cross-process

Is Boost IPC any good? [closed]

可紊 提交于 2019-11-29 14:00:47
问题 My default choice for cross-platform IPC would be boost, but I saw it criticised in two different forums when I asked about it and this concerned me. Perhaps this was simply a coincidence, so what are the thoughts on boost IPC and choosing a cross-platform C++ IPC library in general? For Windows dev we're using VC++ 2008 for reference. edit: here is an example of comments I've seen made (can't find them all right now): for boost, it's crap. At least on windows. The Mutexes don't use WinAPI,

Should I dispose a Mutex?

痞子三分冷 提交于 2019-11-28 10:58:23
I'm working on 2 Windows Services that have a common database which I want to lock (cross-process) with a system Mutex. Now I'm wondering whether it's ok to just call WaitOne() and ReleaseMutex() in a try-finally block or should I also dispose the Mutex (e.g. in a using block). If so I guess I should always catch the AbandonedMutexException on the WaitOne() method or am I wrong here? A mutex is a Windows kernel object (here wrapped in a .NET object). As such, it is an unmanaged resource that should be disposed. More accurately, the .NET object contains a HANDLE to the mutex, which must be