Skip to content

Commit 970f0e0

Browse files
committed
Use STL mutex for VS2017.
A partner reports that it is sane now.
1 parent 30f2a3c commit 970f0e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
#include "crypto.h"
2929

3030
// Ugggggggggg MSVC VS2013 STL bug: try_lock_for doesn't actually respect the timeout, it always ends up using an infinite timeout.
31-
// And even in 2015, the code is calling the timer and to convert a relative time to an absolute time, and waiting until that time,
32-
// which then calls the timer again, and subtracts it back off....It's really bad. Just go directly to the underlying Win32
33-
// primitives
34-
#ifdef _MSC_VER
31+
// And even in 2015, the code is calling the timer to get current time, to convert a relative time to an absolute time, and then
32+
// waiting until that absolute time, which then calls the timer again....and subtracts it back off....It's really bad. Just go
33+
// directly to the underlying Win32 primitives. Looks like the Visual Studio 2017 STL implementation is sane, though.
34+
#if defined(_MSC_VER) && _MSC_VER < 1914
3535
#define MSVC_STL_MUTEX_WORKAROUND
3636
#include <Windows.h>
3737
#endif

0 commit comments

Comments
 (0)