By: Eric Bron (eric.bron.delete@this.zvisuel.privatefortest.com), December 6, 2014 4:04 am
Room: Moderated Discussions
> A competent implementation of std::mutex should map to SRWLock or CriticalSection.
> The mingw implementation of std::mutex is not good in this regard, but the
> C++ runtime that comes with Visual Studio doesn't have that issue.
thank you for the information, I'll do some tests
from the link
http://en.cppreference.com/w/cpp/thread/mutex
"A calling thread must not own the mutex prior to calling lock or try_lock."
this doesn't fit with the behavior of Windows critical sections where you can enter several times the same CS from the thread which own it already (and don't have to leave it the same number of times unlike with std::recursive_mutex)
so I'm not sure of the behavior with the MS VC++ implementation if it's based on Windows critical sections, maybe the behavior is implementation dépendent which looks odd for something were validation is so much important
> The mingw implementation of std::mutex is not good in this regard, but the
> C++ runtime that comes with Visual Studio doesn't have that issue.
thank you for the information, I'll do some tests
from the link
http://en.cppreference.com/w/cpp/thread/mutex
"A calling thread must not own the mutex prior to calling lock or try_lock."
this doesn't fit with the behavior of Windows critical sections where you can enter several times the same CS from the thread which own it already (and don't have to leave it the same number of times unlike with std::recursive_mutex)
so I'm not sure of the behavior with the MS VC++ implementation if it's based on Windows critical sections, maybe the behavior is implementation dépendent which looks odd for something were validation is so much important