OperationCount returns the number of buffered operations in the transaction.
()
| 401 | |
| 402 | // OperationCount returns the number of buffered operations in the transaction. |
| 403 | func (tx *Transaction) OperationCount() int { |
| 404 | tx.mutex.RLock() |
| 405 | defer tx.mutex.RUnlock() |
| 406 | return tx.buffer.OperationCount() |
| 407 | } |
| 408 | |
| 409 | // tryLockWithTimeout attempts to acquire the lock within the specified timeout period. |
| 410 | func tryLockWithTimeout(lock *sync.Mutex, startTime time.Time, maxWait time.Duration) bool { |
no outgoing calls