On quarta-feira, 1 de mar?o de 2017 16:44:51 PST Daniel Mihai wrote:
> An Event would work, as you said, but CRITICAL_SECTION benefits from better
> tools for debugging - e.g., 1. The owner thread ID is easily available
> 2. We can capture the stack trace of the CRITICAL_SECTION Init & Delete
> 3. Application Verifier catches automatically many types if incorrect usage

Ah, I was under the impression that CRITICAL_SECTION was non-recursive. It's 
been too long since I've used it.

Qt uses the other two solutions I mentioned. I'm quite proud of the one using 
WaitOnAddress, since it allows for allocation-free mutexes while in unlocked 
and in uncontended states (no CreateEvent / CloseEvent). I should dust off the 
patch...

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Reply via email to