diff options
author | lukechampine <luke.champine@gmail.com> | 2016-04-02 16:49:41 -0400 |
---|---|---|
committer | lukechampine <luke.champine@gmail.com> | 2016-04-02 17:26:41 -0400 |
commit | 56926f9976da7129ac5cdae7f8acf235d068e68e (patch) | |
tree | fdf126cad9d67af6a117fa0f6c322b0e0b0009d1 /stm_test.go | |
parent | use version in place of simple equality (diff) | |
download | stm-56926f9976da7129ac5cdae7f8acf235d068e68e.tar.gz stm-56926f9976da7129ac5cdae7f8acf235d068e68e.tar.xz |
more idiomatic BenchmarkIncrementSTM
Diffstat (limited to 'stm_test.go')
-rw-r--r-- | stm_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/stm_test.go b/stm_test.go index 06a3238..466f9f9 100644 --- a/stm_test.go +++ b/stm_test.go @@ -148,8 +148,9 @@ func BenchmarkIncrementSTM(b *testing.B) { }) } // wait for x to reach 1000 - for AtomicGet(x).(int) != 1000 { - } + Atomically(func(tx *Tx) { + tx.Assert(tx.Get(x).(int) == 1000) + }) } } |