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

◆ SetValueSlow()

void System.Threading.ThreadLocal< T >.SetValueSlow ( T value,
LinkedSlotVolatile[] slotArray )
inlineprivate

Definition at line 354 of file ThreadLocal.cs.

355 {
356 int num = ~_idComplement;
357 if (num < 0)
358 {
359 throw new ObjectDisposedException(SR.ThreadLocal_Disposed);
360 }
361 if (slotArray == null)
362 {
363 slotArray = new LinkedSlotVolatile[GetNewTableSize(num + 1)];
364 ts_finalizationHelper = new FinalizationHelper(slotArray);
366 }
367 if (num >= slotArray.Length)
368 {
369 GrowTable(ref slotArray, num + 1);
370 ts_finalizationHelper.SlotArray = slotArray;
372 }
373 if (slotArray[num].Value == null)
374 {
376 return;
377 }
378 LinkedSlot value2 = slotArray[num].Value;
379 if (!_initialized)
380 {
381 throw new ObjectDisposedException(SR.ThreadLocal_Disposed);
382 }
383 value2._value = value;
384 }
static LinkedSlotVolatile[] ts_slotArray
static void GrowTable(ref LinkedSlotVolatile[] table, int minLength)
void CreateLinkedSlot(LinkedSlotVolatile[] slotArray, int id, T value)
static int GetNewTableSize(int minSize)
static FinalizationHelper ts_finalizationHelper

References System.Threading.ThreadLocal< T >._initialized, System.Threading.ThreadLocal< T >.CreateLinkedSlot(), System.Threading.ThreadLocal< T >.GetNewTableSize(), System.Threading.ThreadLocal< T >.GrowTable(), System.SR.ThreadLocal_Disposed, System.Threading.ThreadLocal< T >.ts_finalizationHelper, System.Threading.ThreadLocal< T >.ts_slotArray, System.Threading.ThreadLocal< T >.Value, and System.value.