3 ms·
The Win32 mutex is slow because it's also usable across processes. If you don't need cross-process sync, you should really be using a Critical Section instead.
by userbinator 4y ago
The Win32 mutex is slow because it's also usable across processes.
If you don't need cross-process sync, you should really be using a Critical Section instead. The kernel-level interface, which is largely undocumented, is I believe either an Event object or a Keyed Event on later versions.
There's some interesting related discussion on that here: https://microsoft.public.win32.programmer.kernel.narkive.com/2F2a5Nin/question-about-win32-critical-section-implementation https://microsoft.public.win32.programmer.kernel.narkive.com...
Anyone know of a reference implementation of mutexes on Windows?
Look in the WINE source.