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

◆ AtomicStateUpdateSlow()

bool System.Threading.Tasks.Task< TResult >.AtomicStateUpdateSlow ( int newBits,
int illegalBits )
inlineprivateinherited

Definition at line 1388 of file Task.cs.

1389 {
1390 int num = m_stateFlags;
1391 while (true)
1392 {
1393 if ((num & illegalBits) != 0)
1394 {
1395 return false;
1396 }
1397 int num2 = Interlocked.CompareExchange(ref m_stateFlags, num | newBits, num);
1398 if (num2 == num)
1399 {
1400 break;
1401 }
1402 num = num2;
1403 }
1404 return true;
1405 }
volatile int m_stateFlags
Definition Task.cs:954

References System.Threading.Interlocked.CompareExchange(), and System.Threading.Tasks.Task< TResult >.m_stateFlags.

Referenced by System.Threading.Tasks.Task< TResult >.AtomicStateUpdate().