aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stm_test.go5
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)
+ })
}
}