コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
 public void Remove(ReadTransaction trn)
 {
     lock (transactions)
         transactions.Remove(trn);
 }