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

◆ FlushMessageQueue()

bool System.Diagnostics.AsyncStreamReader.FlushMessageQueue ( bool rethrowInNewThread)
inlineprivate

Definition at line 160 of file AsyncStreamReader.cs.

161 {
162 try
163 {
164 while (true)
165 {
166 string obj;
168 {
169 if (_messageQueue.Count == 0)
170 {
171 break;
172 }
174 goto IL_0038;
175 }
176 IL_0038:
177 if (!_cancelOperation)
178 {
180 }
181 }
182 return false;
183 }
184 catch (Exception source)
185 {
187 {
189 {
190 ((ExceptionDispatchInfo)edi).Throw();
192 return true;
193 }
194 throw;
195 }
196 }
readonly Queue< string > _messageQueue
readonly Action< string > _userCallBack
static ExceptionDispatchInfo Capture(Exception source)
static bool QueueUserWorkItem(WaitCallback callBack)

References System.Diagnostics.AsyncStreamReader._cancelOperation, System.Diagnostics.AsyncStreamReader._messageQueue, System.Diagnostics.AsyncStreamReader._userCallBack, System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(), System.Collections.Generic.Queue< T >.Count, System.Collections.Generic.Queue< T >.Dequeue(), System.obj, System.Threading.ThreadPool.QueueUserWorkItem(), and System.source.

Referenced by System.Diagnostics.AsyncStreamReader.BeginReadLine(), and System.Diagnostics.AsyncStreamReader.ReadBufferAsync().