Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryAcquire()

bool System.Threading.LowLevelLock.TryAcquire ( )
inline

Definition at line 33 of file LowLevelLock.cs.

34 {
35 int num = Interlocked.CompareExchange(ref _state, 1, 0);
36 if (num == 0 || TryAcquire_NoFastPath(num))
37 {
38 return true;
39 }
40 return false;
41 }
bool TryAcquire_NoFastPath(int state)

References System.Threading.LowLevelLock._state, System.Threading.Interlocked.CompareExchange(), and System.Threading.LowLevelLock.TryAcquire_NoFastPath().

Referenced by System.Threading.LowLevelLock.Acquire(), and System.Threading.PortableThreadPool.AdjustMaxWorkersActive().