Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ParallelLoopStateFlags32.cs
Go to the documentation of this file.
1
namespace
System.Threading.Tasks
;
2
3
internal
sealed
class
ParallelLoopStateFlags32
:
ParallelLoopStateFlags
4
{
5
internal
volatile
int
_lowestBreakIteration
=
int
.MaxValue;
6
7
internal
int
LowestBreakIteration
=>
_lowestBreakIteration
;
8
9
internal
long
?
NullableLowestBreakIteration
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
}
System.Threading.Interlocked.Read
static long Read(ref long location)
Definition
Interlocked.cs:95
System.Threading.Interlocked
Definition
Interlocked.cs:9
System.Threading.Tasks.ParallelLoopStateFlags32.ShouldExitLoop
bool ShouldExitLoop(int CallerIteration)
Definition
ParallelLoopStateFlags32.cs:26
System.Threading.Tasks.ParallelLoopStateFlags32.NullableLowestBreakIteration
long? NullableLowestBreakIteration
Definition
ParallelLoopStateFlags32.cs:10
System.Threading.Tasks.ParallelLoopStateFlags32._lowestBreakIteration
volatile int _lowestBreakIteration
Definition
ParallelLoopStateFlags32.cs:5
System.Threading.Tasks.ParallelLoopStateFlags32.ShouldExitLoop
bool ShouldExitLoop()
Definition
ParallelLoopStateFlags32.cs:44
System.Threading.Tasks.ParallelLoopStateFlags32.LowestBreakIteration
int LowestBreakIteration
Definition
ParallelLoopStateFlags32.cs:7
System.Threading.Tasks.ParallelLoopStateFlags32
Definition
ParallelLoopStateFlags32.cs:4
System.Threading.Tasks.ParallelLoopStateFlags
Definition
ParallelLoopStateFlags.cs:4
System.Threading.Tasks
Definition
TaskToApm.cs:3
System.IntPtr.Size
static int Size
Definition
IntPtr.cs:21
System.IntPtr
Definition
IntPtr.cs:14
source
System.Threading.Tasks.Parallel
System.Threading.Tasks
ParallelLoopStateFlags32.cs
Generated by
1.10.0