A Windows mutex is not a mutex

Well, it turns out that CreateMutex is not the right synchronization primitive when working with threads. Strictly speaking, it does work for synchronizing threads but it is far more powerfull than that and you are paying a needlessly high cost if you are using it just for threads.…