File: putrace.go

package info (click to toggle)
golang-github-bmatsuo-lmdb-go 1.8.0%2Bgit20170215.a14b5a3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 840 kB
  • sloc: ansic: 8,247; makefile: 19
file content (12 lines) | stat: -rw-r--r-- 474 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
//+build race

package lmdbpool

// transactions abort immediately instead of "being put in the pool" when race
// detection is enabled to prevent benchmarks with race enabled from forcing
// applications to allow ridiculously large maximum numbers of readers.
//
// As of go1.8 the sync.Pool implementation never reuses objects during race
// detection.  The special logic which bypasses this requires a similar bypass
// here, unfortunately.
const returnTxnToPool = false