diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-04-04 12:04:53 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-04-04 12:04:53 -0600 |
commit | 3f7dbffa2e75f859efbc391d0e6a2a2955a84fcb (patch) | |
tree | 8cfb509c6e5c4bbc60f5ae4c036644342dbac899 /db.go | |
parent | Merge pull request #118 from benbjohnson/commit-hook (diff) | |
parent | Rename internal local Tx variables. (diff) | |
download | dedo-3f7dbffa2e75f859efbc391d0e6a2a2955a84fcb.tar.gz dedo-3f7dbffa2e75f859efbc391d0e6a2a2955a84fcb.tar.xz |
Merge pull request #119 from benbjohnson/tx-rename
Rename internal local Tx variables.
Diffstat (limited to 'db.go')
-rw-r--r-- | db.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -361,7 +361,7 @@ func (db *DB) beginRWTx() (*Tx, error) { } // removeTx removes a transaction from the database. -func (db *DB) removeTx(t *Tx) { +func (db *DB) removeTx(tx *Tx) { db.metalock.Lock() defer db.metalock.Unlock() @@ -369,15 +369,15 @@ func (db *DB) removeTx(t *Tx) { db.mmaplock.RUnlock() // Remove the transaction. - for i, tx := range db.txs { - if tx == t { + for i, t := range db.txs { + if t == tx { db.txs = append(db.txs[:i], db.txs[i+1:]...) break } } // Merge statistics. - db.stats.TxStats.add(&t.stats) + db.stats.TxStats.add(&tx.stats) } // Update executes a function within the context of a read-write managed transaction. |