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

◆ CleanupHelper()

void System.Net.Http.FailedProxyCache.CleanupHelper ( )
inlineprivate

Definition at line 59 of file FailedProxyCache.cs.

60 {
61 bool lockTaken = false;
62 try
63 {
65 if (!lockTaken)
66 {
67 return;
68 }
69 long tickCount = Environment.TickCount64;
71 {
72 if (tickCount >= failedProxy.Value)
73 {
75 }
76 }
77 }
78 finally
79 {
80 if (lockTaken)
81 {
82 Interlocked.Exchange(ref _nextFlushTicks, Environment.TickCount64 + 300000);
84 }
85 }
86 }
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
readonly ConcurrentDictionary< Uri, long > _failedProxies
static int Exchange(ref int location1, int value)
void TryEnter(ref bool lockTaken)
Definition SpinLock.cs:103

References System.Net.Http.FailedProxyCache._failedProxies, System.Net.Http.FailedProxyCache._flushLock, System.Net.Http.FailedProxyCache._nextFlushTicks, System.Threading.Interlocked.Exchange(), System.Threading.SpinLock.Exit(), System.Environment.TickCount64, and System.Threading.SpinLock.TryEnter().

Referenced by System.Net.Http.FailedProxyCache.Cleanup().