diff options
author | Matt Joiner <anacrolix@gmail.com> | 2020-09-04 15:44:51 +1000 |
---|---|---|
committer | Matt Joiner <anacrolix@gmail.com> | 2020-09-10 09:22:35 +1000 |
commit | 2a64b89bdbc8fec645dd688bd0322f45c067f295 (patch) | |
tree | 6e1e7d5606d3a16a77ccdd47eb8654296862acf7 /bench_test.go | |
parent | Add exponentially longer sleeping between transaction attempts (diff) | |
download | stm-2a64b89bdbc8fec645dd688bd0322f45c067f295.tar.gz stm-2a64b89bdbc8fec645dd688bd0322f45c067f295.tar.xz |
Add custom VarValue and const for sleep backoff
Diffstat (limited to 'bench_test.go')
-rw-r--r-- | bench_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bench_test.go b/bench_test.go index 08faa96..da2bf97 100644 --- a/bench_test.go +++ b/bench_test.go @@ -199,9 +199,9 @@ func BenchmarkThunderingHerdCondVar(b *testing.B) { func BenchmarkThunderingHerd(b *testing.B) { for i := 0; i < b.N; i++ { - done := NewVar(false) - tokens := NewVar(0) - pending := NewVar(0) + done := NewBuiltinEqVar(false) + tokens := NewBuiltinEqVar(0) + pending := NewBuiltinEqVar(0) for range iter.N(1000) { Atomically(VoidOperation(func(tx *Tx) { tx.Set(pending, tx.Get(pending).(int)+1) |