Fix C++11 Windows build of threading code
The initial problem was that mutex_auto_lock.h tries to use std::unique_lock<std::mutex> despite mutex.h not using C++11's std::mutex on Windows. The problem here is the mismatch between C++11 usage conditions of the two headers. This commit moves the decision logic to threads.h and makes sure mutex.h, mutex_auto_lock.h and event.h all use the same features.
Showing
- src/threading/event.cpp 8 additions, 8 deletionssrc/threading/event.cpp
- src/threading/event.h 6 additions, 11 deletionssrc/threading/event.h
- src/threading/mutex.cpp 9 additions, 10 deletionssrc/threading/mutex.cpp
- src/threading/mutex.h 8 additions, 7 deletionssrc/threading/mutex.h
- src/threading/mutex_auto_lock.h 3 additions, 1 deletionsrc/threading/mutex_auto_lock.h
- src/threading/thread.cpp 10 additions, 10 deletionssrc/threading/thread.cpp
- src/threading/thread.h 4 additions, 9 deletionssrc/threading/thread.h
- src/threads.h 17 additions, 1 deletionsrc/threads.h
Loading
Please register or sign in to comment