private void WakeUp(AllocationContexts allocationContexts) { SleepingContexts ^= allocationContexts; if ((allocationContexts & AllocationContexts.Headers) == AllocationContexts.Headers) { _headersWeakness = 0; } if ((allocationContexts & AllocationContexts.Bodies) == AllocationContexts.Bodies) { _bodiesWeakness = 0; } if ((allocationContexts & AllocationContexts.Receipts) == AllocationContexts.Receipts) { _receiptsWeakness = 0; } if ((allocationContexts & AllocationContexts.State) == AllocationContexts.State) { _stateWeakness = 0; } SleepingSince.TryRemove(allocationContexts, out _); }
private void WakeUp(AllocationContexts allocationContexts) { SleepingContexts ^= allocationContexts; foreach (KeyValuePair <AllocationContexts, int> allocationIndex in AllocationIndexes) { if ((allocationContexts & allocationIndex.Key) == allocationIndex.Key) { _weaknesses[allocationIndex.Value] = 0; } } SleepingSince.TryRemove(allocationContexts, out _); }