MCPcopy Index your code
hub / github.com/apache/casbin / OperationCount

Method OperationCount

transaction.go:403–407  ·  view source on GitHub ↗

OperationCount returns the number of buffered operations in the transaction.

()

Source from the content-addressed store, hash-verified

401
402// OperationCount returns the number of buffered operations in the transaction.
403func (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.
410func tryLockWithTimeout(lock *sync.Mutex, startTime time.Time, maxWait time.Duration) bool {

Callers 1

TestTransactionBufferFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestTransactionBufferFunction · 0.36