diff --git a/src/steamnetworkingsockets/steamnetworkingsockets_thinker.cpp b/src/steamnetworkingsockets/steamnetworkingsockets_thinker.cpp index 2874f41..671979f 100644 --- a/src/steamnetworkingsockets/steamnetworkingsockets_thinker.cpp +++ b/src/steamnetworkingsockets/steamnetworkingsockets_thinker.cpp @@ -95,6 +95,13 @@ ATTR_NO_SANITIZE_THREAD void IThinker::SetNextThinkTime( SteamNetworkingMicrosec s_mutexThinkerTable.unlock(); } +ATTR_NO_SANITIZE_THREAD void IThinker::EnsureMinThinkTime( SteamNetworkingMicroseconds usecTargetThinkTime ) +{ + // Lockless fast-path read -- see SetNextThinkTime for explanation of the intentional race. + if ( usecTargetThinkTime < m_usecNextThinkTime ) + InternalEnsureMinThinkTime( usecTargetThinkTime ); +} + void IThinker::InternalSetNextThinkTime( SteamNetworkingMicroseconds usecTargetThinkTime ) { diff --git a/src/steamnetworkingsockets/steamnetworkingsockets_thinker.h b/src/steamnetworkingsockets/steamnetworkingsockets_thinker.h index affc749..4cc628e 100644 --- a/src/steamnetworkingsockets/steamnetworkingsockets_thinker.h +++ b/src/steamnetworkingsockets/steamnetworkingsockets_thinker.h @@ -31,12 +31,7 @@ public: /// Adjust schedule time to the earlier of the current schedule time, /// or the given time. - ATTR_NO_SANITIZE_THREAD inline void EnsureMinThinkTime( SteamNetworkingMicroseconds usecTargetThinkTime ) - { - // Lockless fast-path read -- see SetNextThinkTime for explanation of the intentional race. - if ( usecTargetThinkTime < m_usecNextThinkTime ) - InternalEnsureMinThinkTime( usecTargetThinkTime ); - } + void EnsureMinThinkTime( SteamNetworkingMicroseconds usecTargetThinkTime ); /// Clear the next think time. You won't get a callback. void ClearNextThinkTime() { SetNextThinkTime( k_nThinkTime_Never ); }