terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
STATaskInvoker.cs
Go to the documentation of this file.
1using System;
5
6namespace ReLogic.OS.Windows
7{
8 // Token: 0x02000B24 RID: 2852
9 internal class STATaskInvoker : IDisposable
10 {
11 // Token: 0x06005350 RID: 21328 RVA: 0x0028447C File Offset: 0x0028267C
13 {
16 this._staThread.Start();
17 }
18
19 // Token: 0x06005351 RID: 21329 RVA: 0x002844A8 File Offset: 0x002826A8
20 public static void Invoke(Action action)
21 {
22 if (!true)
23 {
24 }
25 }
26
27 // Token: 0x06005352 RID: 21330 RVA: 0x002844B8 File Offset: 0x002826B8
28 public static T Invoke<T>(Func<T> action)
29 {
30 /*
31An exception occurred when decompiling this method (06005352)
32
33ICSharpCode.Decompiler.DecompilerException: Error decompiling T ReLogic.OS.Windows.STATaskInvoker::Invoke<T>(System.Func`1<T>)
34
35 ---> System.Exception: Basic block has to end with unconditional control flow.
36{
37 IL_0000:
38 brtrue(IL_0000, ldc.i4:bool(1))
39}
40
41 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
42 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
43 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
44 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
45 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
46 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
47 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
48 --- End of inner exception stack trace ---
49 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
50 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
51*/;
52 }
53
54 // Token: 0x06005353 RID: 21331 RVA: 0x002844C8 File Offset: 0x002826C8
56 {
57 object taskInvokeLock = this._taskInvokeLock;
60 bool flag = Monitor.Wait(this._taskCompletionLock);
61 long num = 0L;
63 if (num != 0L)
64 {
65 throw new OutOfMemoryException();
66 }
67 long num2 = 0L;
69 if (num2 == 0L)
70 {
71 return;
72 }
73 throw new OutOfMemoryException();
74 }
75
76 // Token: 0x06005354 RID: 21332 RVA: 0x0028455C File Offset: 0x0028275C
77 private void TaskThreadStart()
78 {
79 if (this._shouldThreadContinue)
80 {
81 Action action = this._staTasks.Take();
84 IntPtr method_code = action.method_code;
85 IntPtr method = action.method;
86 IntPtr invoke_impl = action.invoke_impl;
88 long num = 0L;
89 if (invoke_impl != 0)
90 {
92 }
93 while (num == 0L)
94 {
95 }
96 return;
97 }
98 }
99
100 // Token: 0x06005355 RID: 21333 RVA: 0x002845E8 File Offset: 0x002827E8
101 private void Shutdown()
102 {
103 }
104
105 // Token: 0x06005356 RID: 21334 RVA: 0x002845F8 File Offset: 0x002827F8
106 protected virtual void Dispose(bool disposing)
107 {
108 if (!this.disposedValue)
109 {
110 this.Shutdown();
112 if (staTasks != null)
113 {
115 }
116 this.disposedValue = true;
117 }
118 }
119
120 // Token: 0x06005357 RID: 21335 RVA: 0x0028462C File Offset: 0x0028282C
121 public void Dispose()
122 {
123 }
124
125 // Token: 0x06005358 RID: 21336 RVA: 0x0028463C File Offset: 0x0028283C
128 {
129 }
130
131 // Token: 0x04008B16 RID: 35606
132 private static STATaskInvoker Instance;
133
134 // Token: 0x04008B17 RID: 35607
136
137 // Token: 0x04008B18 RID: 35608
139
140 // Token: 0x04008B19 RID: 35609
142
143 // Token: 0x04008B1A RID: 35610
144 private object _taskInvokeLock;
145
146 // Token: 0x04008B1B RID: 35611
147 private object _taskCompletionLock;
148
149 // Token: 0x04008B1C RID: 35612
150 private bool disposedValue;
151
152 // Token: 0x02000B25 RID: 2853
154 private sealed class <>c__DisplayClass8_0<T>
155 {
156 // Token: 0x06005359 RID: 21337 RVA: 0x0028464C File Offset: 0x0028284C
158 {
159 }
160
161 // Token: 0x0600535A RID: 21338 RVA: 0x00284660 File Offset: 0x00282860
162 internal void <Invoke>b__0()
163 {
164 Func func = this.action;
166 }
167
168 // Token: 0x04008B1D RID: 35613
169 public T output;
170
171 // Token: 0x04008B1E RID: 35614
172 public Func<T> action;
173 }
174 }
175}
class f__AnonymousType0<< Count > j__TPar
virtual void Dispose(bool disposing)
static void Invoke(Action action)
static T Invoke< T >(Func< T > action)
BlockingCollection< Action > _staTasks
static bool Wait(object obj, int millisecondsTimeout, bool exitContext)
Definition Monitor.cs:64
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11
static void Pulse(object obj)
Definition Monitor.cs:85