protected static void RemoveFromVariablesToRemove(InternalThreadLocalMap threadLocalMap, FastThreadLocal variable) { object v = threadLocalMap.GetIndexedVariable(VariablesToRemoveIndex); if (v == InternalThreadLocalMap.Unset || v == null) { return; } var variablesToRemove = (HashSet<FastThreadLocal>)v; variablesToRemove.Remove(variable); }
protected static void AddToVariablesToRemove(InternalThreadLocalMap threadLocalMap, FastThreadLocal variable) { object v = threadLocalMap.GetIndexedVariable(VariablesToRemoveIndex); HashSet<FastThreadLocal> variablesToRemove; if (v == InternalThreadLocalMap.Unset || v == null) { variablesToRemove = new HashSet<FastThreadLocal>(); // Collections.newSetFromMap(new IdentityHashMap<FastThreadLocal<?>, Boolean>()); threadLocalMap.SetIndexedVariable(VariablesToRemoveIndex, variablesToRemove); } else { variablesToRemove = (HashSet<FastThreadLocal>)v; } variablesToRemove.Add(variable); }
protected static void RemoveFromVariablesToRemove(InternalThreadLocalMap threadLocalMap, FastThreadLocal variable) { object v = threadLocalMap.GetIndexedVariable(VariablesToRemoveIndex); if (v == InternalThreadLocalMap.Unset || v is null) { return; } var variablesToRemove = (HashSet <FastThreadLocal>)v; _ = variablesToRemove.Remove(variable); }
protected static void AddToVariablesToRemove(InternalThreadLocalMap threadLocalMap, FastThreadLocal variable) { object v = threadLocalMap.GetIndexedVariable(VariablesToRemoveIndex); HashSet <FastThreadLocal> variablesToRemove; if (v == InternalThreadLocalMap.Unset || v is null) { variablesToRemove = new HashSet <FastThreadLocal>(); // Collections.newSetFromMap(new IdentityHashMap<FastThreadLocal<?>, Boolean>()); _ = threadLocalMap.SetIndexedVariable(VariablesToRemoveIndex, variablesToRemove); } else { variablesToRemove = (HashSet <FastThreadLocal>)v; } _ = variablesToRemove.Add(variable); }