public void Add(ReadTransaction trn) { lock (transactions) { transactions.Add(trn); var numberOfTransactions = transactions.Count; if (numberOfTransactions > MaxPoolSize * 0.8) { Log.Info($"{numberOfTransactions} transactions active"); } if (numberOfTransactions >= MaxPoolSize || numberOfTransactions == (int)(MaxPoolSize * 0.9)) { LogHighNumberOfTransactions(numberOfTransactions >= MaxPoolSize); } } }
public void Remove(ReadTransaction trn) { lock (transactions) transactions.Remove(trn); }