Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ParallelLoopStateFlags32.cs
Go to the documentation of this file.
2
4{
5 internal volatile int _lowestBreakIteration = int.MaxValue;
6
8
10 {
11 get
12 {
13 if (_lowestBreakIteration == int.MaxValue)
14 {
15 return null;
16 }
17 long location = _lowestBreakIteration;
18 if (IntPtr.Size >= 8)
19 {
20 return location;
21 }
22 return Interlocked.Read(ref location);
23 }
24 }
25
26 internal bool ShouldExitLoop(int CallerIteration)
27 {
28 int loopStateFlags = base.LoopStateFlags;
29 if (loopStateFlags != 0)
30 {
31 if ((loopStateFlags & 0xD) == 0)
32 {
33 if (((uint)loopStateFlags & 2u) != 0)
34 {
35 return CallerIteration > LowestBreakIteration;
36 }
37 return false;
38 }
39 return true;
40 }
41 return false;
42 }
43
44 internal bool ShouldExitLoop()
45 {
46 int loopStateFlags = base.LoopStateFlags;
47 if (loopStateFlags != 0)
48 {
49 return (loopStateFlags & 9) != 0;
50 }
51 return false;
52 }
53}
static long Read(ref long location)
static int Size
Definition IntPtr.cs:21