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

◆ SetCurrentTotal()

bool System.Threading.Barrier.SetCurrentTotal ( int currentTotal,
int current,
int total,
bool sense )
inlineprivate

Definition at line 83 of file Barrier.cs.

84 {
85 int num = (current << 16) | total;
86 if (!sense)
87 {
88 num |= int.MinValue;
89 }
90 return Interlocked.CompareExchange(ref _currentTotalCount, num, currentTotal) == currentTotal;
91 }
volatile int _currentTotalCount
Definition Barrier.cs:9

References System.Threading.Barrier._currentTotalCount, and System.Threading.Interlocked.CompareExchange().

Referenced by System.Threading.Barrier.AddParticipants(), System.Threading.Barrier.RemoveParticipants(), and System.Threading.Barrier.SignalAndWait().