Skip to content

Commit 380c380

Browse files
committed
Increase lock warnings under tsan even more
1 parent 4128327 commit 380c380

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ struct ThreadLockDebugInfo
156156

157157
static void (*s_fLockAcquiredCallback)( const char *tags, SteamNetworkingMicroseconds usecWaited );
158158
static void (*s_fLockHeldCallback)( const char *tags, SteamNetworkingMicroseconds usecWaited );
159+
#ifdef __SANITIZE_THREAD__
160+
static SteamNetworkingMicroseconds s_usecLockWaitWarningThreshold = 300*1000;
161+
#else
159162
static SteamNetworkingMicroseconds s_usecLockWaitWarningThreshold = 2*1000;
163+
#endif
160164

161165
/// Get the per-thread debug info
162166
static ThreadLockDebugInfo &GetThreadDebugInfo()
@@ -2877,7 +2881,7 @@ static bool PollRawUDPSockets( int nMaxTimeoutMS, bool bManualPoll )
28772881
// perhaps we should ignore this assert?
28782882
// TSan adds 10-20x overhead so the threshold is scaled up accordingly.
28792883
#ifdef __SANITIZE_THREAD__
2880-
constexpr SteamNetworkingMicroseconds k_usecServiceThreadLockWaitWarning = 50*1000*20;
2884+
constexpr SteamNetworkingMicroseconds k_usecServiceThreadLockWaitWarning = 300*1000;
28812885
#else
28822886
constexpr SteamNetworkingMicroseconds k_usecServiceThreadLockWaitWarning = 50*1000;
28832887
#endif

0 commit comments

Comments
 (0)