diff options
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) + }) } } |